Logging - vcspull.log

Log utilities for formatting CLI output in vcspull.

This module containers special formatters for processing the additional context information from libvcs.base.RepoLoggingAdapter.

Colorized formatters for generic logging inside the application is also provided.

vcspull.log.get_cli_logger_names(include_self=True)
function[source]

Return logger names under vcspull.cli.

Parameters:

include_self (bool)

Return type:

list[str]

vcspull.log.setup_logger(log=None, level='INFO')
function[source]

Configure the vcspull logging hierarchy once and reuse it everywhere.

Parameters:
  • log (Logger | None)

  • level (Literal['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL'])

Return type:

None

class vcspull.log.LogFormatter

Bases: Formatter

Log formatting for vcspull.

class vcspull.log.DebugLogFormatter

Bases: LogFormatter

Provides greater technical details than standard log Formatter.

class vcspull.log.RepoLogFormatter

Bases: LogFormatter

Log message for VCS repository.

class vcspull.log.SimpleLogFormatter

Bases: Formatter

Simple formatter that outputs only the message, like print().

class vcspull.log.RepoFilter

Bases: Filter

Only include repo logs for this type of record.