Skip to content

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

Description

@gaurav

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions