# Save data to log with textmsg()

**URL:** <https://forum.universal-robots.com/t/save-data-to-log-with-textmsg/4885>\
**Category:** URScript\
**Created:** [August 9, 2019, 2:30pm UTC](https://forum.universal-robots.com/t/save-data-to-log-with-textmsg/4885 "2019-08-09T14:30:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon76959719](https://avatars.discourse-cdn.com/v4/letter/a/58f4c7/32.png) [@anon76959719](https://forum.universal-robots.com/u/anon76959719)\
**Post date:** [August 9, 2019, 2:30pm UTC](https://forum.universal-robots.com/t/save-data-to-log-with-textmsg/4885/1 "2019-08-09T14:30:59Z")

</div>

Hi!

I have to log some data from a UR10, to examine it’s conditions during operation. I wrote a thread which send these data to the log file, using textmsg(). According to the counter, about 1000000 lines of data has been sent to the log, but when copied the log file to a USB drive, by magic file, I haven’t found all the lines. The log\_history.txt contains only 40760 lines and there are also 151000 more in the log\_history.bak.  
Is there any method to gain access to the whole log history?

---

<div class="post-metadata">

**Author:** ![mmi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/mmi/32/691_2.png) [@mmi](https://forum.universal-robots.com/u/mmi)\
**Post date:** [August 14, 2019, 1:44pm UTC](https://forum.universal-robots.com/t/save-data-to-log-with-textmsg/4885/2 "2019-08-14T13:44:04Z")

</div>

There is only one backup file created for log\_history, older entries are lost.  
If you need to log so much data, then custom logging is recommended.  
You can start from python tcp server, that saves received messages to text file.

---

<div class="post-metadata">

**Author:** ![anon44705757](https://avatars.discourse-cdn.com/v4/letter/a/ec9cab/32.png) [@anon44705757](https://forum.universal-robots.com/u/anon44705757)\
**Post date:** [August 14, 2019, 10:39pm UTC](https://forum.universal-robots.com/t/save-data-to-log-with-textmsg/4885/3 "2019-08-14T22:39:40Z")

</div>

Hi Dima,

I would lke to know why you need all this data. We have just developed a tool for reading log and flightreports and normally is enough for finding out the problems of the cobot.

I would like to get in touch with you.  
My phone number is +34605357710  
My email is [jalonso@analytics40.com](mailto:jalonso@analytics40.com).

Thanks
