Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!ecngs!feeder2.ecngs.de!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.013 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'python.': 0.02; 'subject:Python': 0.06; 'parsing': 0.09; 'wrapper': 0.09; 'cc:addr :python-list': 0.11; 'python': 0.11; '>>': 0.16; "(it's": 0.16; 'entries.': 0.16; 'library).': 0.16; 'subject:log': 0.16; 'subject:parser': 0.16; 'files.': 0.16; 'wrote:': 0.18; 'module': 0.19; 'example': 0.22; 'email addr:gmail.com>': 0.22; 'cc:addr:python.org': 0.22; 'entries': 0.24; 'parse': 0.24; 'text.': 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; "i've": 0.25; '>': 0.26; 'header:In-Reply-To:1': 0.27; 'unix': 0.29; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'url:mailman': 0.30; 'asked': 0.31; 'about.': 0.31; 'perl': 0.31; 'file': 0.32; 'this.': 0.32; 'url:python': 0.33; 'running': 0.33; 'fri,': 0.33; 'received:74.125.82': 0.34; 'could': 0.34; 'problem.': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'url:listinfo': 0.36; 'thanks': 0.36; 'hi,': 0.36; 'url:org': 0.36; 'depends': 0.38; 'files': 0.38; 'pm,': 0.38; 'explain': 0.39; 'received:74.125': 0.39; 'generating': 0.39; 'url:mail': 0.40; 'no.': 0.61; "you're": 0.61; 'more': 0.64; 'url:search': 0.81; 'lifestyle': 0.84; 'yet?': 0.84; 'edwards': 0.91; 'to:none': 0.92; 'obtained': 0.96; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:cc:content-type; bh=TCAv4FJDScAyA90Eq2GGBnYlu8MoQ+rPYj8vOPanr+c=; b=qVyp2vSby6xUNCPt/LDUXTaze8825LeiMMm5c2sZFcorO9UBNXR5lOu4msWetooXvH CRKw7pSCRHxkO+9UsCQfM0szkBMXhDUPUNDZgg9knDJ2m3Vy/xL2P+ThiTY+m4Lsb7Wu 4SJGoPV0+0kch+lq+7JPfq7wSicIhxdcJLjlIAWBlfCky7VVO0zot8vrC2+olepl/0l6 Kt4UkqBaSl6ZyOWIGjBsoPZNiXlsRhXehIm5M1BP0Gq9j2rNBe2gvJ+g0O67z1WS6ihI omp4xztEbeypCXDJnaQhFmOmivYpDKeeHEBYaO+8ZEMxaDXhL/yXDTja349NLbmro6u/ kpXQ== MIME-Version: 1.0 X-Received: by 10.180.189.17 with SMTP id ge17mr4428074wic.17.1365169347782; Fri, 05 Apr 2013 06:42:27 -0700 (PDT) In-Reply-To: References: Date: Fri, 5 Apr 2013 16:42:27 +0300 Subject: Re: Python log parser From: Nac Temha Cc: python-list@python.org Content-Type: multipart/alternative; boundary=001a11c22866086e2a04d99d42d4 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 120 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1365169349 news.xs4all.nl 6913 [2001:888:2000:d::a6]:43644 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:42821 --001a11c22866086e2a04d99d42d4 Content-Type: text/plain; charset=ISO-8859-1 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 > --001a11c22866086e2a04d99d42d4 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable


On Fri, Apr 5, 2013 at 4:31 PM, Grant Edwards <invalid@invalid.i= nvalid> wrote:
On 2013= -04-05, rh <richard_hubbe= 11@lavabit.com> wrote:
> On Fri, 5 Apr 2013 02:17:55 +0300 Nac Temha <naccttemha@gmail.com> wrote:
>
>> Hi, I'm working to parse log file= s. 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 h= ave
>> suggestion?
>
> pydoc syslog
>
> That intenough?

No. =A0Can you be more specific? =A0All the documentation I've found fo= r
the syslog module is for _generating_ log entries (it's a wrapper for the Unix syslog library).


Thanks for understand me.
=A0
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=20 module(http://search.cpan.org/dist/Parse-Syslog/lib/Parse/Syslog.pm). I= =20 obtained host,program,message text. I want to do them with python.


=A0
Parsing syslog files is not a well-defined problem. =A0The format of a
syslog file depends on which system log daemon you're running and now it's configured.

--
Grant Edwards =A0 =A0 =A0 =A0 =A0 =A0 =A0 grant.b.edwards =A0 =A0 =A0 =A0Yo= w! Do I have a lifestyle
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 at =A0 = =A0 =A0 =A0 =A0 =A0 =A0 yet?
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 gmail.com
--
http://mail.python.org/mailman/listinfo/python-list

--001a11c22866086e2a04d99d42d4--