Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #75692
| From | Peter Otten <__peter__@web.de> |
|---|---|
| Subject | Re: creating log file with Python logging module |
| Date | 2014-08-04 16:03 +0200 |
| Organization | None |
| References | <003d01cfafe2$e0668ac0$a133a040$@traxens.com> <lro1j7$r2d$1@ger.gmane.org> <lro39e$f7u$1@ger.gmane.org> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.12643.1407161038.18130.python-list@python.org> (permalink) |
Peter Otten wrote: > Peter Otten wrote: > >> You won't see a rollover if you restart it. > > Sorry, I tried it and the above statement is wrong. [Arulnambi Nandagoban] > logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - > %(message)s', datefmt='%a, %d %b %Y %H:%M:%S', level = logging.DEBUG, > filename=Ffilename, filemode='w') > > logger = logging.getLogger(__name__) > > hdlr = TimedRotatingFileHandler(Ffilename, when='midnight') My alternative theory about what might be going wrong: you are using the same file in logging.basicConfig() and the TimedRotatingFileHandler. But I cannot replicate the problem on my (linux) system.
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: creating log file with Python logging module Peter Otten <__peter__@web.de> - 2014-08-04 16:03 +0200
csiph-web