On Thu, 8 Nov 2018, Alan Martinovic wrote:
Hi,
I have an embedded device with rsyslog which log events locally by default.
When the devices is switched into debug mode, which is an action that
ideally doesn't need restarting, all the previously locally logged
events should be sent to the log server. New log events should also be
forwarded to the server as long as debug mode is on.
Debug mode is just a conceptual state in which the device is optimized
for debugging, nothing implementation specific.
Looking for suggestions on how to achieve this with rsyslog?
There is no good way to send logs that rsyslog has finished processing, but
there are two possible ways to change the behavior on the fly to send out new
messages.
1. the $\ global variables can be used to set a flag (currently this is rather
expensive, but some work could be done to make these variables cheaper to query)
2. you could abuse the table lookup functionality to load a new lookup table
when you go into debug mode and to a lookup in this table to decide if you are
going to send the log remote or not.
David Lang
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE
THAT.