MCPcopy Create free account
hub / github.com/dbcli/mycli / log

Function log

mycli/config.py:17–23  ·  view source on GitHub ↗

Logs message to stderr if logging isn't initialized.

(logger: logging.Logger, level: int, message: str)

Source from the content-addressed store, hash-verified

15
16
17def log(logger: logging.Logger, level: int, message: str) -> None:
18 """Logs message to stderr if logging isn't initialized."""
19
20 if logger.parent and logger.parent.name == "root":
21 print(message, file=sys.stderr)
22
23 logger.log(level, message)
24
25
26def read_config_file(f: str | IO[str], list_values: bool = True) -> ConfigObj | None:

Callers 2

read_config_fileFunction · 0.85

Calls

no outgoing calls