Is it dangerous to offer a menu item that reads the plugin log and outputs certain lines to the Event Log? I was just thinking that this could result in an infinite loop depending on how Indigo handled the logging.

It would be a very limited set of lines, I wanted to offer an easy way for the user to see a list of results that the plugin takes over a period of time, and would be hard to see just traversing their event log.

I just re-read it to be sure. Though I'm not sure it helps. Here's what I'm trying to do:

1. In my Grafana plugin, the user has the ability to set up filtering rules that execute when updates to their indigo devices occur (deviceUpdated, variableUpdated)2. Each rule as it is processed, the results can be optionally outputted to the Indigo Event Log3. Regardless of how the user configures the event log option, the logs are put into my plugin log for debugging..4. However, since the rules are processed as device updates come in, you could easily miss a log entry. I wanted to make it easy to show these log entries by traversing the plugin log, filtering for certain messages, and outputing it to the Indigo Log. This is for the USER, not for debugging my plugin.

I run into a parsing problem while doing this. Every time I ran using the plugin log as the source, it duplicates the log entries in the plugin.log since I'm taking data from the log and placing it back into the Indigo log. So, I've moved away from this strategy.

I've now created a new log file of my own inside the plugin. It contains an entry for the filters that I can easily output to the Indigo Log via the Menu Item I've added. Plugin updates will clear the log, and I've created a way to prune it, and tail any outputs to limit to the the last 50 messages.

It just occurred to me that you can probably use Python's logger with the filename as specified above. Then you'd use a file handler to do the writing, which also has options for automatically trimming data, etc. Then you'd just need the ability to read from that file and re-log it to the standard logger that the plugin gets when it starts up.