Login

Tag "syslog"

Snippet List

Simple Syslog Logging Class with Decorator

Simple logging decorator. Logs the function name along with the message. `Jul 14 16:10:42 mtzion test_func: 1 two` Define SYSLOG_FACILITY in settings.py. import syslog SYSLOG_FACILITY = syslog.LOG_LOCAL1

  • decorator
  • logging
  • syslog
Read More

Log to syslog

This will use the syslog system to log your logs. This is usefull when you use WSGI and want to have a per day logging file (TimedRotatingFileHandler is not process safe, and you may lose data when using it with WSGI). Under a debian system, you'll have to modify **/etc/rsyslog.conf** and add: local0.* -/var/log/django/django.log local1.* -/var/log/django/payment.log

  • logging
  • syslog
Read More

2 snippets posted so far.