Logger

Semantiva uses Python’s standard logging module and exposes a small layer on top for convenience and trace consistency.

Module

class semantiva.logger.logger.Logger(level=None, console_output=None, logger=None, name='Semantiva', formatter=None)[source]
logger
set_console_output(enable=True)[source]
set_file_output(file_path)[source]
set_verbose_level(verbosity_level)[source]
verbosity_map = {'CRITICAL': 50, 'DEBUG': 10, 'ERROR': 40, 'INFO': 20, 'WARNING': 30}

From the CLI

Verbosity flags map to logging levels:

  • -q → WARNING

  • -v → INFO

  • -vv → DEBUG

When running via semantiva run or semantiva inspect these flags control both console output and, where configured, file logging.

Advanced configuration

You can customise logging using standard logging configuration mechanisms (for example logging.config.dictConfig or file-based configs) as long as they respect:

  • The logger names used in Semantiva (such as semantiva and semantiva.trace).

  • The fact that trace drivers may emit structured records independently of logging.

In distributed settings (for example when using semantiva-ray) log file naming and log shipping are handled by the integration layer. See the corresponding extension documentation for details.