Logging
This module contains functions to handle logging in the application.
FUNCTION | DESCRIPTION |
---|---|
get_git_info |
Get current git branch name, short commit hash, and commit datetime in UTC |
get_package_info |
Get package information (local, editable, source path) |
log_version_info |
Log version information of the package |
start_logging |
Start logging to file |
Documentation last updated: 2025-06-11
get_git_info
Get current git branch name, short commit hash, and commit datetime in UTC.
PARAMETER | DESCRIPTION |
---|---|
directory
|
path to git repository. Defaults to '.'.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
tuple[str | None, str | None, datetime | None]
|
tuple[str|None, str|None]: branch name, short commit hash, commit datetime in UTC |
get_package_info
Get package information (local, editable, source path)
PARAMETER | DESCRIPTION |
---|---|
package_name
|
name of the package
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
tuple[bool, bool, Path | None]
|
tuple[bool, bool, Path|None]: is_local, is_editable, source_path |
start_logging
start_logging(
log_dir: Path | str | None = None,
log_file: Path | str | None = None,
log_config_file: Path | str | None = None,
logging_config: dict | None = None,
) -> Path | None
Start logging to file. Default logging behavior is to log to file in current working directory.
PARAMETER | DESCRIPTION |
---|---|
log_dir
|
log directory path. Defaults to None.
TYPE:
|
log_file
|
log file path. Defaults to None.
TYPE:
|
log_config_file
|
path to logging configuration file. Defaults to None.
TYPE:
|
logging_config
|
logging configuration. Defaults to None.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Path | None
|
Path|None: path to log file; None if logging_config is provided |