At 02:03 PM 5/10/2008, Martin Walsh wrote:
Dick Moores wrote:
> But how to use the logging module to log the report of the screw up?
> Right now I don't care about the various levels. I just want to get
> something into a log file.
>
> Hellmann suggest this:
>
> import logging
> LOG_FILENAME = '/
Dick Moores wrote:
> But how to use the logging module to log the report of the screw up?
> Right now I don't care about the various levels. I just want to get
> something into a log file.
>
> Hellmann suggest this:
>
> import logging
> LOG_FILENAME = '/tmp/logging_example.out'
> logging.basicCon
> I found the problem. It was rather simple actually. I didn't have remote
> logging enabled for syslog. Even though I was logging to localhost, for
> some reason, it wouldn't work until I gave syslogd a -r at startup.
> Thanks
localhost is still remote, in that sockets are used to reach it. Th
Thanks for the reply Kent.
I found the problem. It was rather simple actually. I didn't have remote
logging enabled for syslog. Even though I was logging to localhost, for
some reason, it wouldn't work until I gave syslogd a -r at startup. Thanks
jay
On 7/25/07, Kent Johnson <[EMAIL PROTECTE
jay wrote:
> Hello,
>
> I'm trying to setup simple Syslog logging in python using the logging
> module. I would like to use a config file, but so far haven't been able
> to get the correct configuration. Actually, I don't get any warnings or
> errors, program runs fine, but nothing is logged
Hans Fangohr wrote:
> Hi Kent (and others),
>
> On 01/09/06, Kent Johnson <[EMAIL PROTECTED]> wrote:
>
>> How are you running the program? What OS? What Python (2.3.??)
>>
> This is python 2.3.5 on Debian etch. Same results with python 2.4.4 on
> Debian etch (although 'the linenumber' is 10
Hi Kent,
> > I have some trouble with the logging module.
> >
> > When I run this program with python2.3:
> >
> > #
> > import logging,sys
> > formatter = logging.Formatter('%(name)s :%(asctime)s %(filename)s
> > %(lineno)s %(levelname)s %(message)s')
> > stdout_handler = logging.Stre
Dear Hans,
i haven't worked with the logging module yet but as a guess from what you write
in your message:
according to the documentation the format statement for lineno should be
%(lineno)d, but you use %(lineno)s.
Best regards,
Ralf
> Hi,
>
> I have some trouble with the logging module.
Hans Fangohr wrote:
> Hi,
>
> I have some trouble with the logging module.
>
> When I run this program with python2.3:
>
> #
> import logging,sys
> formatter = logging.Formatter('%(name)s :%(asctime)s %(filename)s
> %(lineno)s %(levelname)s %(message)s')
> stdout_handler = logging.Stre