You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In essence, if we use the python logging facility, you should be careful because when you create a logging handler for a function, it seems that it is essentially forked off the root handler. Unless you remove the root handlers they remain active. This was a problem in my case because I imported the ImageFileCollection function and the moment I ran it for the first time, logging was activated including the root handler. This meant when I tried to use logging in my program, I was getting extra copies of the logging because the root handler was also responding to my logging calls.
I removed the root handlers by issuing the following:
# Turn off root loggers that are activated by ImageFileCollection
for handler in logging.root.handlers[:]:
logging.root.removeHandler(handler)
I would suggest unless you are intending to use the root handlers in ccdproc that you remove them yourself when you spin up the logging. That said, if there is another suggested way to handle this situation, I would appreciate the feedback.
The text was updated successfully, but these errors were encountered:
Can you please provide an example that demonstrates the problem? At first glance, at least, I'm not seeing any place in ccdproc that uses the root logger.
In essence, if we use the python logging facility, you should be careful because when you create a logging handler for a function, it seems that it is essentially forked off the root handler. Unless you remove the root handlers they remain active. This was a problem in my case because I imported the
ImageFileCollection
function and the moment I ran it for the first time, logging was activated including the root handler. This meant when I tried to use logging in my program, I was getting extra copies of the logging because the root handler was also responding to my logging calls.I removed the root handlers by issuing the following:
I would suggest unless you are intending to use the root handlers in
ccdproc
that you remove them yourself when you spin up the logging. That said, if there is another suggested way to handle this situation, I would appreciate the feedback.The text was updated successfully, but these errors were encountered: