Anyone using log4j
Does everything still get sent too the main openhab logs openhab & events
Or if you tell a log event too log too a seperate log file does it go only there or both places
I’m after a new seperate log file for my electric uses
20mar usage WAS 100KWH costing £100
20Apr. Usage was 89KW costong £80
But also puts the log in the main logs is it worth setting up?
It depends on how you set it up. It can go to just the one file or it can go to multiple files.
It’s probably going to be easier to use
executeCommandLine with something like
executeCommandLine('bash', '-c', 'echo "' + msg + '" >> /path/to/log/file')
Log4j is organized with categories, usually category reflect package and class name. Easiest way to separate logs is through specific category which gets its own appender. You can achieve sikilar results with filters, however they are much more complex in setup.
Look if place where you produce log statements have possibilty to specify category.
This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.