Script logging

Posted on
Wed Oct 19, 2022 1:45 pm
MarcoGT offline
Posts: 1091
Joined: Sep 11, 2014
Location: Germany

Script logging

I have a few Python script which log quite a lot.
In Indigo Touch but also in the Mac Client, the “headline/title” is “Script”.

Would it be possible to have the script name?
Now my workaround is to put the script name in the log statement.

Thanks
Marco

Posted on
Wed Oct 19, 2022 6:30 pm
DaveL17 offline
User avatar
Posts: 6753
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Script logging

The built-in Indigo log handler accepts three parameters:

Code: Select all
indigo.server.log(message="I like waffles.", type="my_script_name", isError=False)
This prints the following:

Code: Select all
Oct 19, 2022 at 7:29:17 PM
   my_script_name                  I like waffles.
Lot's more information on logging can be found here: https://wiki.indigodomo.com/doku.php?id=indigo_2022.1_documentation:plugin_guide#logging

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 5 guests

cron