logs

The logging facility can be configured separately against different parts of the library.

Logs can be configured separately between the console and the optional file output, which will be created in the /output folder in the glyphdeck root directory.

Levels

Each level is controlled by an integer corresponding to those in the core python logging library.

You only get logs at or above the level you set.

  • 10 - DEBUG - all logs (this can be a lot!)

  • 20 - INFO - summarised information only

  • 20 - ERROR - errors handled by the library

  • 50 - CRITICAL - all other errors

glyphdeck.reset_logging()

Restore the logger configuration yaml file to its original state.

Useful to reset to defaults or recover if your changes have broken the file, but beware as this will overwrite any modifications in the config.

Note

  • Enables info level logs for all console loggers

  • Disables all file loggers

  • Disables all input/output logging

glyphdeck.configure_logging(
log_input_data: bool | None = None,
log_output_data: bool | None = None,
setting_type: str | None = None,
set_all_levels: Tuple[int] | None = None,
data_types_levels: Tuple[int] | None = None,
prepper_levels: Tuple[int] | None = None,
cascade_levels: Tuple[int] | None = None,
sanitiser_levels: Tuple[int] | None = None,
validators_levels: Tuple[int] | None = None,
llm_handler_levels: Tuple[int] | None = None,
cache_levels: Tuple[int] | None = None,
workflows_levels: Tuple[int] | None = None,
strings_levels: Tuple[int] | None = None,
time_levels: Tuple[int] | None = None,
file_importers_levels: Tuple[int] | None = None,
unhandled_errors_levels: Tuple[int] | None = None,
)

Configure the logging settings by changing the configuration yaml file.

This function allows you to modify various logging settings such as whether to log input and output data, the source of logging levels, and the logging levels for different components of the module.

Changes here affect the module globally for current and future use, but won’t take effect until the module is re-initialised.

Parameters:
  • log_input_data (Optional[bool]) – Include input data in logs

  • log_output_data (Optional[bool]) – Include LLM output data in logs

  • setting_type (Optional[str]) – (“default”, “set_all” or “granular”) Controls status of other levels

  • set_all_levels (Optional[Tuple[int]]) – (file_level, console_level) Used if setting_type == “set_all”

  • data_types_levels (Optional[Tuple[int]]) – (file_level, console_level) Used if setting_type == “granular”

  • prepper_levels (Optional[Tuple[int]]) – (file_level, console_level) Used if setting_type == “granular”

  • cascade_levels (Optional[Tuple[int]]) – (file_level, console_level) Used if setting_type == “granular”

  • sanitiser_levels (Optional[Tuple[int]]) – (file_level, console_level) Used if setting_type == “granular”

  • validators_levels (Optional[Tuple[int]]) – (file_level, console_level) Used if setting_type == “granular”

  • llm_handler_levels (Optional[Tuple[int]]) – (file_level, console_level) Used if setting_type == “granular”

  • cache_levels (Optional[Tuple[int]]) – (file_level, console_level) Used if setting_type == “granular”

  • workflows_levels (Optional[Tuple[int]]) – (file_level, console_level) Used if setting_type == “granular”

  • strings_levels (Optional[Tuple[int]]) – (file_level, console_level) Used if setting_type == “granular”

  • time_levels (Optional[Tuple[int]]) – (file_level, console_level) Used if setting_type == “granular”

  • file_importers_levels (Optional[Tuple[int]]) – (file_level, console_level) Used if setting_type == “granular”

  • unhandled_errors_levels (Optional[Tuple[int]]) – (file_level, console_level) Used if setting_type == “granular”