Python log parser

Nac Temha naccttemha at gmail.com
Fri Apr 5 09:42:27 EDT 2013


On Fri, Apr 5, 2013 at 4:31 PM, Grant Edwards <invalid at invalid.invalid>wrote:

> On 2013-04-05, rh <richard_hubbe11 at lavabit.com> wrote:
> > On Fri, 5 Apr 2013 02:17:55 +0300 Nac Temha <naccttemha at gmail.com>
> wrote:
> >
> >> Hi, I'm working to parse log files. But I need to help this matter. I
> >> want to parse syslog(wihch program is running, timestamp,host,etc) of
> >> system I could not find any module of python for this. Or do you have
> >> suggestion?
> >
> > pydoc syslog
> >
> > That intenough?
>
> No.  Can you be more specific?  All the documentation I've found for
> the syslog module is for _generating_ log entries (it's a wrapper for
> the Unix syslog library).
>
>
Thanks for understand me.


> That's not what the OP asked about.
>
> The OP asked about parsing syslog files, not generating syslog file
> entries.
>
>
Can syslog module parsing syslog messages? I give you example for better
explain this matter; I can parse perl module(
http://search.cpan.org/dist/Parse-Syslog/lib/Parse/Syslog.pm). I obtained
host,program,message text. I want to do them with python.




> Parsing syslog files is not a well-defined problem.  The format of a
> syslog file depends on which system log daemon you're running and now
> it's configured.
>
> --
> Grant Edwards               grant.b.edwards        Yow! Do I have a
> lifestyle
>                                   at               yet?
>                               gmail.com
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20130405/ddc594e6/attachment.html>


More information about the Python-list mailing list