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

Replace top-level logger with per-class loggers #19

Open
gaurav opened this issue Sep 10, 2021 · 1 comment
Open

Replace top-level logger with per-class loggers #19

gaurav opened this issue Sep 10, 2021 · 1 comment
Assignees

Comments

@gaurav
Copy link
Collaborator

gaurav commented Sep 10, 2021

At the moment, all logging in sheet2linkml is carried out by running e.g.:

logging.info(f"Google Sheet loaded: {model}")

The recommended way of using loggers is to create a context specific or per-class logger object and use that, i.e.

logger = logging.getLogger(__name__)
click_log.basic_config(logger)

# code for module

logger.info(f"Google Sheet loaded: {model}")

(Note the use of click-log to allow users to configure the logging from the command line, so we no longer have to include a logger.ini file)

I'm going to mark this low-priority, since the current scheme works for now. However, new code should definitely use this scheme, and we should probably find some time towards the end of this year or early next year to do this.

@sujaypatil96
Copy link
Collaborator

This issue is perhaps best suited for the sheet2linkml repo, whenever that comes to fruition. I can take up the responsibility of integrating click-log with sheet2linkml, so I'm assigning this issue to myself.

@sujaypatil96 sujaypatil96 self-assigned this Sep 16, 2021
@gaurav gaurav transferred this issue from cancerDHC/ccdhmodel Nov 12, 2021
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