logging

A

alain.marcel

Hi all !
How to remove a logger ?
There si no logging.removeLogger(name) method.
I've a lot of objects that create loging.
When objects are destroyed, associated logger are not. This create
memory leak...

Thanks for any idea.
 
D

Diez B. Roggisch

Hi all !
How to remove a logger ?
There si no logging.removeLogger(name) method.
I've a lot of objects that create loging.
When objects are destroyed, associated logger are not. This create
memory leak...

Instead of removing unused loggers, reuse them. Calling getLogger with an
already known name will not create a new one, but instead return the
already existing one.

Diez
 
A

alain.marcel

Diez B. Roggisch wote:
Instead of removing unused loggers, reuse them. Calling getLogger with an
already known name will not create a new one, but instead return the
already existing one.

Diez

Hi

That's a good idea but object name change (necessity).
The only issue seems to have a pool of loggers and select one into it.
I have to encapsulate logging library...
Thanks a lot.

Any ideas ?
 
J

Jorge Vargas

Hi all !
How to remove a logger ?
There si no logging.removeLogger(name) method.
I've a lot of objects that create loging.

why you need a logger per object? IMO 1 per package is more then enough.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,431
Messages
2,571,679
Members
48,796
Latest member
Greg L.

Latest Threads

Top