bacommon.logging

Logging functionality.

 1# Released under the MIT License. See LICENSE for details.
 2#
 3"""Logging functionality."""
 4
 5from __future__ import annotations
 6
 7import logging
 8from typing import TYPE_CHECKING
 9from bacommon.loggercontrol import LoggerControlConfig
10
11if TYPE_CHECKING:
12    pass
13
14
15def get_base_logger_control_config_client() -> LoggerControlConfig:
16    """Return the logger-control-config used by the ballistica client.
17
18    This should remain consistent since local logger configurations
19    are stored relative to this.
20    """
21
22    # By default, go with WARNING on everything to keep things mostly
23    # clean but show INFO for ba.lifecycle to get basic app
24    # startup/shutdown messages.
25    return LoggerControlConfig(
26        levels={'root': logging.WARNING, 'ba.lifecycle': logging.INFO}
27    )
def get_base_logger_control_config_client() -> bacommon.loggercontrol.LoggerControlConfig:
16def get_base_logger_control_config_client() -> LoggerControlConfig:
17    """Return the logger-control-config used by the ballistica client.
18
19    This should remain consistent since local logger configurations
20    are stored relative to this.
21    """
22
23    # By default, go with WARNING on everything to keep things mostly
24    # clean but show INFO for ba.lifecycle to get basic app
25    # startup/shutdown messages.
26    return LoggerControlConfig(
27        levels={'root': logging.WARNING, 'ba.lifecycle': logging.INFO}
28    )

Return the logger-control-config used by the ballistica client.

This should remain consistent since local logger configurations are stored relative to this.