views:

56

answers:

1

I would like my Django application to be able to display local syslog etc files. I would like to avoid writing the logic for managing .1,.2 etc rotated files, and get an object for each log that I can retrieve a set of rows from.

Is there any such python library, or even better, any such django app?

Clarification: I don't want to write messages to a log, I want to read the messages that are already there.

A: 

Python has a syslog module. You can also use SysLogHandler.

katrielalex
Does that handle rotated files as well?
extraneon
I believe all the log rotation is handled by `syslog` itself, although I haven't used it so I'm not sure.
katrielalex
Both of those appear to be for writing messages to syslog, whereas I am trying to display the contents of the logs.
kdt