Re: logging producing redundant entries

2006-03-31 Thread Kent Johnson
Jed Parsons wrote: > > Thanks, Kent and Peter, > > Definitely making progress here. I've got propagate = 0, and am testing > for handlers before doing any addHandler business. (The handlers test > seems to make the most difference.) > > I'm down to two entries per time now! And prodding Zop

Re: logging producing redundant entries

2006-03-31 Thread Jed Parsons
Thanks, Kent and Peter, Definitely making progress here. I've got propagate = 0, and am testing for handlers before doing any addHandler business. (The handlers test seems to make the most difference.) I'm down to two entries per time now! And prodding Zope to reload the module doesn't ca

Re: logging producing redundant entries

2006-03-31 Thread Kent Johnson
Jed Parsons wrote: > Thanks, Peter and alex23, > > The metalog test shows that the code is only being executed once at a time. > > And if I take those lines and put them in a shell script (fixing the > FileHandler - sorry about the bad copy there), they work as expected, > producing a single lo

Re: logging producing redundant entries

2006-03-31 Thread Peter Otten
Jed Parsons wrote: > Am I somehow accumulating a growing list of loggers by having this code > at the top of a zope Extension? I'd rather look after the number of handlers which is probably growing and causing your problem. Normally it shouldn't matter how often you repeat the logging.getLogger(n

Re: logging producing redundant entries

2006-03-31 Thread Jed Parsons
Thanks, Peter and alex23, The metalog test shows that the code is only being executed once at a time. And if I take those lines and put them in a shell script (fixing the FileHandler - sorry about the bad copy there), they work as expected, producing a single log entry. So I'm left with: - l

Re: logging producing redundant entries

2006-03-30 Thread Peter Otten
Jed Parsons wrote: > I'm using the logging module for the first time. I'm using it from > within Zope Extensions. > > My problem is that, for every event logged, the logger is producing > multiple identical entries with the timestamp the same down to the > millisecond. > > Is this something I'm

Re: logging producing redundant entries

2006-03-30 Thread alex23
Jed Parsons wrote: > My problem is that, for every event logged, the logger is producing > multiple identical entries with the timestamp the same down to the > millisecond. > import logging > # basicConfig for python 2.3 > logging.basicConfig() [...] > _logger.addHandler(_handl

logging producing redundant entries

2006-03-30 Thread Jed Parsons
Hi, I'm using the logging module for the first time. I'm using it from within Zope Extensions. My problem is that, for every event logged, the logger is producing multiple identical entries with the timestamp the same down to the millisecond. Is this something I'm doing wrong? Log snippet: