Jump to content

Write event log


ergodic

Recommended Posts

With variables now, I'm finding it is feasible to write more complex program sets.

 

But debugging now gets to be a challenge.

 

Would it be feasible to add an action to the ISY allowing for a write to the event log, or some log? All that's really needed is a timestamp, text and optionally one variable value; maybe the program name, something like that. Nothing elaborate.

Link to comment

I was just thinking a simple action: "Log Message" -- that would allow for a brief string of arbitrary text and optionally the value of a variable to display whenever the log action is hit.

 

The line would contain the timestamp, the text, and the value of the variable at that moment. I'm assuming writing to the event log that the ISY already maintains.

 

If the text string is a problem then just the name of the program doing it probably works OK.

 

Something like this?

 

Sun 06/12/2011 12:09:57 AM ***Program Log Entry: "Starting P1" $P1.State = 3

 

 

There might be other uses for this I haven't considered, but just for debugging purposes that should do it.

Link to comment
  • 1 month later...

I'm using "Notify" right now as a stopgap measure for debugging. It works, but creating a "Log" primitive with comparable semantics would be MUCH, MUCH better since all the info needed for debugging would end up correctly serialized and in one place. If the "Log" capability had the exact same interface as Notify that would be great - it is very flexible and allows dumping just about anything in a user defined format.

Link to comment

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...