On Sun, Apr 19, 2009 at 3:18 PM, Scott SA wrote:
> I guess I should really find the actual code and read what
> it is doing... as Kent very gently prodded me with.
It's in the Lib directory of your Python installation.
> I did go through a few
> PEPs too, and I don't recall seeing anything about
Hi Stephan & Kent,
On Apr 19, 2009, at 6:12 AM, Stefan Behnel wrote:
just commenting on this part:
... which basically says append WARNING messages to the rotating file
handler in DatetimeLevelMessage format to a log-file named
test_warn.log
splitting the log-file when it exceeds 125829120
Hi,
just commenting on this part:
Scott SA wrote:
> [handler_warn_logfile]
> class=handlers.RotatingFileHandler
> level=WARNING
> formatter=DatetimeLevelMessage
> args=('test_warn.log', 'a', 125829120, 5)
> filename=test_warn.log
> mode=a
>
> ... which basically says
On Sat, Apr 18, 2009 at 5:07 PM, Scott SA wrote:
> I want to re-direct the logs from python's logging library and while using a
> config file rather than instantiating all of the logging within my actual
> code.
>
> So, lets say I have a file log.conf that contains the various directives for
> th
Hi,
For some reason, I'm having a bit of trouble figuring this one out. I
know it has to be relatively easy but it just isn't "working" for me
at the moment.
I want to re-direct the logs from python's logging library and while
using a config file rather than instantiating all of the loggi
On Tue, Apr 7, 2009 at 6:34 PM, wrote:
> Hello everyone...
>
> My intention is to create a generic logging function I can use across
> scripts. I have a few things I would like this function to be able to
> accomplish:
>
> 1. log info and above to console
> 2. log debug and above to file
> 3. for
Hello everyone...
My intention is to create a generic logging function I can use across
scripts. I have a few things I would like this function to be able to
accomplish:
1. log info and above to console
2. log debug and above to file
3. format the output for each differently
4. allow areas
Hans Fangohr wrote:
> FYI: The reason for wanting to use two different file formats is this:
> we have a somewhat larger project (http://nmag.soton.ac.uk) where we
> combine high-level Python code with low-level Objective Caml code (and
> a number of libraries). We would like to use the Python-logg
HI Riccardo,
>>>
>>> As far as I can see, the only reason in your example program to
>>> open the
>>> same file twice is to use two different formatters (i.e. two
>>> different
>>> type of lines) in the same log,
>> Absolutely right.
>>
>>> if you'd drop the requirement for two
>>> different f
Hans Fangohr wrote:
Ricardo Aráoz wrote:
> Kent Johnson wrote:
>> I don't know the answer, but it has nothing to do with the logging
>> module. The question is, can the same file reliably be opened
>> twice for
>> writing in the same module.
>
> Well, the question w
Ricardo Aráoz wrote:
Why should it be all or nothing. Couldn't the programmer indicate that
both handlers use the same file?
It would be very easy to do this using StreamHandlers instead of
FileHandlers. It would also be easy to make a FileHandler subclass that
keeps a map from file name to fil
Ricardo Aráoz wrote:
Kent Johnson wrote:
I don't know the answer, but it has nothing to do with the logging
module. The question is, can the same file reliably be opened twice for
writing in the same module.
Well, the question would actually be if the logging module is smart
enough to find out
Ricardo Aráoz wrote:
> Why should it be all or nothing. Couldn't the programmer indicate that
> both handlers use the same file?
It would be very easy to do this using StreamHandlers instead of
FileHandlers. It would also be easy to make a FileHandler subclass that
keeps a map from file name to
Kent Johnson wrote:
> Hans Fangohr wrote:
>> Dear all,
>>
>> thanks to everybody who replied to my question.
>>
>> On 15 Dec 2007, at 16:34, Kent Johnson wrote:
>>
>>> Ricardo Aráoz wrote:
>
>> What is the recommended method to make such a suggestion to the python
>> team, or the people who look
Hans Fangohr wrote:
> Dear all,
>
> thanks to everybody who replied to my question.
>
> On 15 Dec 2007, at 16:34, Kent Johnson wrote:
>
>> Ricardo Aráoz wrote:
>>> Kent Johnson wrote:
I don't know the answer, but it has nothing to do with the logging
module. The question is, can the sa
Hans Fangohr wrote:
> Dear all,
>
> thanks to everybody who replied to my question.
>
> On 15 Dec 2007, at 16:34, Kent Johnson wrote:
>
>> Ricardo Aráoz wrote:
> What is the recommended method to make such a suggestion to the python
> team, or the people who look after the logging module?
You
Dear all,
thanks to everybody who replied to my question.
On 15 Dec 2007, at 16:34, Kent Johnson wrote:
> Ricardo Aráoz wrote:
>> Kent Johnson wrote:
>>> I don't know the answer, but it has nothing to do with the logging
>>> module. The question is, can the same file reliably be opened
>>> twi
- Original Message -
From: "Hans Fangohr" <[EMAIL PROTECTED]>
To:
Sent: Saturday, December 15, 2007 1:43 AM
Subject: [Tutor] python logging module: two handlers writing to the
samefile - okay?
> I have an example program (test.py) and the logging configurati
Ricardo Aráoz wrote:
> Kent Johnson wrote:
>> I don't know the answer, but it has nothing to do with the logging
>> module. The question is, can the same file reliably be opened twice for
>> writing in the same module.
>
> Well, the question would actually be if the logging module is smart
> eno
Kent Johnson wrote:
> Hans Fangohr wrote:
>
>> (i) is this (as in the log.conf file) the right use of the logging
>> module to achieve what I need?
>
> I think you understand the module correctly.
>
>> (ii) in particular, it appears we have two filehandlers that write to
>> the same file (in mod
Hans Fangohr wrote:
> (i) is this (as in the log.conf file) the right use of the logging
> module to achieve what I need?
I think you understand the module correctly.
> (ii) in particular, it appears we have two filehandlers that write to
> the same file (in mode 'a+'). While this seems to work
Dear all,
I am trying to set up a logging system with the following specs:
- all messages should be printed to stdout and to a file (here called log.log).
- we have two types of loggers that the code uses: 'normal' and 'short'.
- The 'short' logger just prints less detail (it
basically needs
22 matches
Mail list logo