[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Is there any way to use the logging module adding nothing to a message

cl at writes:

> If I do:-
>     f = logging.handlers.RotatingFileHandler("/home/chris/tmp/mail.log", 'a', 1000000, 4)
>     f.setLevel(logging.DEBUG)
>     formatter = logging.Formatter('%(message)s')
>     f.setFormatter(formatter)
>     log.addHandler(f)
> Will I get just the message with no extras added by the logging module?

Yuo have the code, and presumably the system on which to test it. What's
the answer?

 \      ?I am too firm in my consciousness of the marvelous to be ever |
  `\       fascinated by the mere supernatural ?? ?Joseph Conrad, _The |
_o__)                                                     Shadow-Line_ |
Ben Finney