# URCaps Logging file

**URL:** <https://forum.universal-robots.com/t/urcaps-logging-file/6320>\
**Category:** URCap Development\
**Created:** [February 11, 2020, 2:39pm UTC](https://forum.universal-robots.com/t/urcaps-logging-file/6320 "2020-02-11T14:39:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![s\_c](https://avatars.discourse-cdn.com/v4/letter/s/9dc877/32.png) [@s\_c](https://forum.universal-robots.com/u/s_c)\
**Post date:** [February 11, 2020, 2:39pm UTC](https://forum.universal-robots.com/t/urcaps-logging-file/6320/1 "2020-02-11T14:39:50Z")

</div>

Good morning,  
I would like to know if it’s possible to create a log file to monitor the execution of an URCaps. I need something to track the user interactions so that I can have something to check if an error occurred.

---

<div class="post-metadata">

**Author:** ![sam.verity-hilton](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/sam.verity-hilton/32/6046_2.png) [@sam.verity-hilton](https://forum.universal-robots.com/u/sam.verity-hilton)\
**Post date:** [February 12, 2020, 9:24am UTC](https://forum.universal-robots.com/t/urcaps-logging-file/6320/2 "2020-02-12T09:24:45Z")

</div>

The Universal has a log file built into its file system, and you can write to it using the scipt command `textmsg()`, details of which can be found in the script manual. Since you can’t natively send URScript through java, you have to send scupt using the secondary client interface, the details of which cna be found linked in [this post](https://forum.universal-robots.com/t/can-urcap-send-and-execute-ur-script-within-the-program-node/378).

You could send messges to the log file by adding secondary client communication in any relevent `listener` classes, for e.g. when a button is pressed.

You can then access the log history in the log\_history.txt file in the home/ursim/ursim-X.X.X.XXXXX in the simulator, or if on a real robot, there is a magic file for taking a copy of the robot log file.

Hope this helps.

---

<div class="post-metadata">

**Author:** ![s\_c](https://avatars.discourse-cdn.com/v4/letter/s/9dc877/32.png) [@s\_c](https://forum.universal-robots.com/u/s_c)\
**Post date:** [February 19, 2020, 8:18am UTC](https://forum.universal-robots.com/t/urcaps-logging-file/6320/3 "2020-02-19T08:18:32Z")

</div>

Thank you very much. I’ll try the solution you suggested.
