Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #33760 > unrolled thread
| Started by | cerr <ron.eggler@gmail.com> |
|---|---|
| First post | 2012-11-21 11:26 -0800 |
| Last post | 2012-11-21 13:01 -0800 |
| Articles | 4 — 4 participants |
Back to article view | Back to comp.lang.python
logger doesn't roll over cerr <ron.eggler@gmail.com> - 2012-11-21 11:26 -0800
Re: logger doesn't roll over Gary Chambers <gwchamb@gwcmail.com> - 2012-11-21 14:41 -0500
Re: logger doesn't roll over Ron Eggler <ron.eggler@gmail.com> - 2012-11-21 11:50 -0800
Re: logger doesn't roll over Paul Rubin <no.email@nospam.invalid> - 2012-11-21 13:01 -0800
| From | cerr <ron.eggler@gmail.com> |
|---|---|
| Date | 2012-11-21 11:26 -0800 |
| Subject | logger doesn't roll over |
| Message-ID | <4a09e161-9185-4bac-905c-828222bdc67e@googlegroups.com> |
Hi,
I'm using Python's logger for logging but it doesn't seem to roll over, my file is now 2.2MB and should've rolled over after ever 1MB.
My code:
logger = logging.getLogger("")
logger.setLevel(logging.DEBUG)
handler = logging.handlers.RotatingFileHandler(
LOGFILE, maxBytes=(1048576*10), backupCount=5
)
What am I doing wrong here, I don't get it.
Thank you!
Ron
[toc] | [next] | [standalone]
| From | Gary Chambers <gwchamb@gwcmail.com> |
|---|---|
| Date | 2012-11-21 14:41 -0500 |
| Message-ID | <mailman.171.1353527367.29569.python-list@python.org> |
| In reply to | #33760 |
Ron, > LOGFILE, maxBytes=(1048576*10), backupCount=5 > What am I doing wrong here, I don't get it. 10 * 1048576 = 10MB -- GC
[toc] | [prev] | [next] | [standalone]
| From | Ron Eggler <ron.eggler@gmail.com> |
|---|---|
| Date | 2012-11-21 11:50 -0800 |
| Message-ID | <mailman.172.1353527464.29569.python-list@python.org> |
| In reply to | #33760 |
Hooops sh*t! I outsmarted myself I guess... :o However, Thanks for the kick GC! Ron Eggler 1804 - 1122 Gilford St. Vancouver, BC V6G 2P5 (778) 230-9442 On 12-11-21 11:41 AM, Gary Chambers wrote: > Ron, > >> LOGFILE, maxBytes=(1048576*10), backupCount=5 >> What am I doing wrong here, I don't get it. > > 10 * 1048576 = 10MB > > -- > GC
[toc] | [prev] | [next] | [standalone]
| From | Paul Rubin <no.email@nospam.invalid> |
|---|---|
| Date | 2012-11-21 13:01 -0800 |
| Message-ID | <7x3902ekm8.fsf@ruckus.brouhaha.com> |
| In reply to | #33760 |
cerr <ron.eggler@gmail.com> writes: > 2.2MB and should've rolled over after ever 1MB. > LOGFILE, maxBytes=(1048576*10), backupCount=5 1048576*10 is 10MB, not 1MB.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web