god
god copied to clipboard
Specify syslog server for remote logging
Hey guys! I would like to redirect all god logs to a Greylog2 server. Is there any way to specify the syslog server that I would like to log to directly from god?
You would have to do that via your local syslog server. God just uses the syslog()
call to log locally to syslog.
Thanks Eric, I'll figure it out in syslog and post the solution here in case anyone finds it useful.
Although I'm also logging to Graylog via syslog, I was just thinking that it would be nice if one could simply set a logger
instance in the configuration file. The interface as implemented by SimpleLogger
is straightforward enough to be compatible with a logger from the gelf-rb gem or probably a number of other logging libraries.
That way, it would be more comfortable to add tags or set a separate facility name. I'd be willing to implement this in case you're interested.