Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

have easyaccess use its own logger, not the default, so it doesn't mess up other logging configuraitons #132

Closed
ehneilsen opened this issue Jun 28, 2017 · 2 comments

Comments

@ehneilsen
Copy link

When I load easyaccess as a python module (to use non-interactively), it messes up my logging configuration, so that I get every logging message twice, once in the format I want, and once in the one preferred by easyaccess. The easy way around it is for easyacces to use its own instance of logging.Logger, not the default one.

Yes, I can "solve" this by having my script use its own instance of logging.Logger rather than the default one, but it shouldn't have to: distributed modules should leave the default logger alone, and define and use their own instances of logging.Logger.

@kadrlica
Copy link
Collaborator

I think this was an issue with the old logging.basicConfig call:

logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(levelname)s - %(message)s',
datefmt='%m/%d/%Y %I:%M:%S %p')

However, I don't think we were ever using logging (a la #21) and I think this has been removed in more recent versions (v1.4.2). @ehneilsen can you confirm whether or not this is an issue with new versions of easyaccess?

@ehneilsen
Copy link
Author

I just tested with the newer version (1.4.2, by way of anaconda environment des17a on the DES cluster at Fermilab) and indeed it seems not to be a problem there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants