Re: Python log parser

Discussion in 'Python' started by rh, Apr 5, 2013.

  1. rh

    rh Guest

    pydoc syslog

    That intenough?

    On Fri, 5 Apr 2013 02:17:55 +0300
    Nac Temha <> 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?
    rh, Apr 5, 2013
    #1
    1. Advertising

  2. On 2013-04-05, rh <> wrote:
    > On Fri, 5 Apr 2013 02:17:55 +0300 Nac Temha <> 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).

    That's not what the OP asked about.

    The OP asked about parsing syslog files, not generating syslog file
    entries.

    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
    Grant Edwards, Apr 5, 2013
    #2
    1. Advertising

  3. rh

    Nac Temha Guest

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

    > On 2013-04-05, rh <> wrote:
    > > On Fri, 5 Apr 2013 02:17:55 +0300 Nac Temha <>

    > 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
    >
    Nac Temha, Apr 5, 2013
    #3
  4. rh

    darnold Guest

    darnold, Apr 5, 2013
    #4
  5. On Fri, 5 Apr 2013 16:42:27 +0300, Nac Temha <>
    declaimed the following in gmane.comp.python.general:

    > 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.
    >

    parse::syslog is not the same as sys::syslog

    Python's syslog module does what sys::syslog does -- it /writes/
    syslog data, it does NOT read it.
    --
    Wulfraed Dennis Lee Bieber AF6VN
    HTTP://wlfraed.home.netcom.com/
    Dennis Lee Bieber, Apr 7, 2013
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Henrik_the_boss
    Replies:
    0
    Views:
    2,643
    Henrik_the_boss
    Nov 5, 2003
  2. Amratash
    Replies:
    0
    Views:
    517
    Amratash
    Apr 13, 2004
  3. =?Utf-8?B?VG9tIFdpbmdlcnQ=?=

    My.Log.Writeexception not writing to Application Event Log.

    =?Utf-8?B?VG9tIFdpbmdlcnQ=?=, Jan 20, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    2,369
    =?Utf-8?B?VG9tIFdpbmdlcnQ=?=
    Jan 20, 2006
  4. unomystEz
    Replies:
    0
    Views:
    542
    unomystEz
    Nov 19, 2006
  5. Dave Angel

    Re: Python log parser

    Dave Angel, Apr 5, 2013, in forum: Python
    Replies:
    1
    Views:
    100
    Grant Edwards
    Apr 5, 2013
Loading...

Share This Page