djangosnippets.org: Latest snippets tagged with 'syslog'https://djangosnippets.org/tags/syslog/2010-07-16T17:14:10.771192-05:00Simple Syslog Logging Class with Decorator
2010-07-16T17:14:10.771192-05:00barnardohttps://djangosnippets.org/snippets/2111/<p>Simple logging decorator. Logs the function name along with the message.
</p>
<p><code>Jul 14 16:10:42 mtzion test_func: 1 two</code>
</p>
<p>Define SYSLOG_FACILITY in settings.py.
</p>
<pre><code>import syslog
SYSLOG_FACILITY = syslog.LOG_LOCAL1
</code></pre>
Freely redistributableLog to syslog
2010-02-09T02:05:56.896406-06:00fylbhttps://djangosnippets.org/snippets/1915/<p>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 <strong>/etc/rsyslog.conf …</strong></p>
Freely redistributable