It worked. Setting disable_existing_loggers=False fixed my problem.
Thanks to both of you!
Ovidiu
On Fri, Mar 26, 2010 at 9:09 PM, Vinay Sajip wrote:
> On Mar 26, 4:26 pm, Ovidiu Deac wrote:
>> Anyway, thanks for the first part.
>>
>> Anybody else has any idea why using the same configuration f
On Mar 26, 4:26 pm, Ovidiu Deac wrote:
> Anyway, thanks for the first part.
>
> Anybody else has any idea why using the same configuration file works
> when running the tests with nosetests and doesn't work
> withlogging.config.fileConfig() ?
It's probably because the fileConfig code is intended
Anyway, thanks for the first part.
Anybody else has any idea why using the same configuration file works
when running the tests with nosetests and doesn't work with
logging.config.fileConfig() ?
--
http://mail.python.org/mailman/listinfo/python-list
Ovidiu Deac wrote:
You set le level of your handler, but did not set the level of the logger
itself.
Replace file.setLevel(logging.INFO) by
logging.getLogger().setLevel(logging.INFO)
Log events are matched versus the logger level 1st, then the handler level
(if applicable). Most of the time you
> You set le level of your handler, but did not set the level of the logger
> itself.
> Replace file.setLevel(logging.INFO) by
> logging.getLogger().setLevel(logging.INFO)
>
> Log events are matched versus the logger level 1st, then the handler level
> (if applicable). Most of the time you don't ne
Ovidiu Deac wrote:
Then I tried this:
file = logging.FileHandler(logFileBasename, 'w')
file.setLevel(logging.INFO)
# set a format which is simpler for console use
formatter = logging.Formatter('%(asctime)s %(name)-12s
%(levelname)-8s %(message)s',)
# tell the handler to use th