New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logging through syslog #49

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

Comments

Projects
None yet
3 participants
@yegor256

yegor256 commented Jul 21, 2013

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

This comment has been minimized.

yegor256 commented Jul 21, 2013

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

This comment has been minimized.

yegor256 commented Jul 21, 2013

Possible workaround:

while true
do
  dynamic-dynamodb ... | logger -t dyndyn
  sleep 60
done &
@willejs

This comment has been minimized.

willejs commented Jul 25, 2013

logstash would be far better imho :)

@sebdah

This comment has been minimized.

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

This comment has been minimized.

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

This comment has been minimized.

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

This comment has been minimized.

Owner

sebdah commented Jul 26, 2013

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

@sebdah

This comment has been minimized.

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

@ghost ghost assigned sebdah Feb 2, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment