sidescanpy.log#

Logging helpers for sidescanpy.

Policy: library modules only create logger = logging.getLogger(__name__) and log at DEBUG (parameters used, defaults applied, fallbacks) or WARNING (real data problems). They never configure handlers and never print. Entry points (the sidescan-* CLIs, consumer scripts) call configure_logging() once to decide what is shown and where.

2026 rshomberg@uri.edu

Contents

LOG_FORMAT

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

LOG_DATEFMT

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

configure_logging

Configure the root logger for a command-line or script entry point.

log_timing

Log "<label>: <seconds>s" when the with block exits.

sidescanpy.log.LOG_FORMAT = '%(asctime)s %(levelname)-7s %(name)s: %(message)s'#

str(object=’’) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to ‘strict’.

sidescanpy.log.LOG_DATEFMT = '%H:%M:%S'#

str(object=’’) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to ‘strict’.

sidescanpy.log.configure_logging(level='INFO', *, log_file=None, library_level=None, fmt=None)#

Configure the root logger for a command-line or script entry point.

Installs a stderr stream handler (and a file handler if log_file is given) on the root logger at level. library_level sets the sidescanpy logger’s own level (e.g. "DEBUG" for -v) while leaving third-party loggers at level; None lets it inherit. Noisy third-party loggers are always held at WARNING. Safe to call repeatedly: handlers from a previous call are replaced.

sidescanpy.log.log_timing(logger, label, level=10)#

Log "<label>: <seconds>s" when the with block exits.