logging through syslog #49

Closed
yegor256 opened this Issue Jul 21, 2013 · 8 comments

Projects

None yet

3 participants

@yegor256

Would be nice to have an ability to log through syslog, in daemon mode, e.g.:

dynamic-dynamodb --instance foo --syslog dyndyn \
  --table-name foo --check-interval 300 --daemon start \

Where dyndyn is a facility for syslog.

@yegor256

Or maybe it's possible to enable console logging for daemon mode? If yes, I can do just this:

dynamic-dynamodb --daemon start ... | logger -t dyndyn
@yegor256

Possible workaround:

while true
do
  dynamic-dynamodb ... | logger -t dyndyn
  sleep 60
done &
@willejs
willejs commented Jul 25, 2013

logstash would be far better imho :)

@sebdah
Owner
sebdah commented Jul 26, 2013

I really think this is a good idea. Also, it would make sense to make the logging implementation better over all. It's currency somewhat hardcoded. Maybe all configuration handling should be lifted out to a separate logging.conf.

@willejs Logstash has an syslog input, so that requirement should be fulfilled with a syslog implementation

I will not be able to look at this right now as I'm on vacation. But will probably look more into it in a few weeks. If anyone else wants to dig in to it, feel free!

@willejs
willejs commented Jul 26, 2013

I'm going to start using this in production soon, so will make a pull request with the logstash handler, I'm not a big fan of the syslog format...the logstash foat is way easier to deal with

@sebdah
Owner
sebdah commented Jul 26, 2013

Still, lifting this out to a real Python logging config file will enable users to choose their own log handlers. To implement solution specific handlers directly makes no sense. Lifting the configuration out from the code (log_handler.py) and into a regular logging.config.fileConfig should be pretty easy.

@sebdah
Owner
sebdah commented Jul 26, 2013

A handler for logstash should be accessible using the python-logstash package.

@sebdah
Owner
sebdah commented Feb 2, 2014

This has been resolved in #74 by supporting an external Python logging configuration file.

The feature will be rolled out with version 1.8.0, which is likely to be released during next week.

@sebdah sebdah closed this Feb 2, 2014
@sebdah sebdah was assigned Feb 2, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment