# In windows how to log only tcp recived data in file with data recieved time

**URL:** <https://discourse.nodered.org/t/in-windows-how-to-log-only-tcp-recived-data-in-file-with-data-recieved-time/18722>\
**Category:** General\
**Created:** [3 December 2019 05:39 UTC](https://discourse.nodered.org/t/in-windows-how-to-log-only-tcp-recived-data-in-file-with-data-recieved-time/18722 "2019-12-03T05:39:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![VIKRAMAS](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/vikramas/32/3955_2.png) [@VIKRAMAS](https://discourse.nodered.org/u/VIKRAMAS)\
**Post date:** [3 December 2019 05:39 UTC](https://discourse.nodered.org/t/in-windows-how-to-log-only-tcp-recived-data-in-file-with-data-recieved-time/18722/1 "2019-12-03T05:39:16Z")

</div>

In Node-red I am recieving node-red data from TCP. I wanted to log the data recieved and the time. How can I log this in windows.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [3 December 2019 07:37 UTC](https://discourse.nodered.org/t/in-windows-how-to-log-only-tcp-recived-data-in-file-with-data-recieved-time/18722/2 "2019-12-03T07:37:18Z")

</div>

A debug node set to send to the console is the simplest way to log the data, unless that's not what you mean

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [4 December 2019 11:31 UTC](https://discourse.nodered.org/t/in-windows-how-to-log-only-tcp-recived-data-in-file-with-data-recieved-time/18722/3 "2019-12-04T11:31:48Z")

</div>

> [@VIKRAMAS](#):
>
> How can I log this in windows

What kind of log? just visual? to a file or db?

Node-RED can do any of these and more.

For the timestamp, that is also easy. The change node has "timestamp" as one of the options so you can simply add a timestamp to a convenient property of the received message.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/9/905f329b19dd4919327558e51dea2e5da748c687.png)
