ergodic Posted June 10, 2011 Posted June 10, 2011 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.
Michel Kohanim Posted June 10, 2011 Posted June 10, 2011 Hello ergodic, Are you referring to writing a log entry from programs? With kind regards, Michel
Michel Kohanim Posted June 12, 2011 Posted June 12, 2011 Hello ergodic, Thank you! What would be the contents of the log entry? With kind regards, Michel
ergodic Posted June 12, 2011 Author Posted June 12, 2011 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.
Michel Kohanim Posted June 12, 2011 Posted June 12, 2011 Hello ergodic, Thanks so very much. It would be difficult to add variable values in the log entry now. Simple text is much easier. With kind regards, Michel
ergodic Posted June 12, 2011 Author Posted June 12, 2011 Too bad - it would be really helpful in sorting out programs where you're using state variables to control things, but I understand.
sperok Posted July 28, 2011 Posted July 28, 2011 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.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.