Custom events logging format for splunk

Can you actually modify the contents of the actual log statement through the logback.xml? My understanding is that the “onkyoPower state updated to OFF” is actually generated by the thing logging and logback.xml mainly controls the rest of the logging statement (e.g. date stamp, originator, etc) and not the statement itself. That would be cool though if you can.

I would approach this using the Logging Persistenec binding. That way you can separate out just the items you want to have logged (rather than everything published to the event bus) if you want to and control the format of the statement. It separates out the item name as the logger name and the state as the msg so you can use logging:pattern=logger=%msg.

1 Like