Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #109477
| From | Ben Finney <ben+python@benfinney.id.au> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: Is there any way to use the logging module adding nothing to a message |
| Date | 2016-06-04 21:55 +1000 |
| Message-ID | <mailman.149.1465041358.1839.python-list@python.org> (permalink) |
| References | <lara2d-s4v.ln1@esprimo.zbmc.eu> <85inxp418c.fsf@benfinney.id.au> |
cl@isbd.net 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
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Is there any way to use the logging module adding nothing to a message cl@isbd.net - 2016-06-04 12:40 +0100
Re: Is there any way to use the logging module adding nothing to a message Ben Finney <ben+python@benfinney.id.au> - 2016-06-04 21:55 +1000
Re: Is there any way to use the logging module adding nothing to a message cl@isbd.net - 2016-06-04 13:14 +0100
csiph-web