PermitechLoggerSingleton
A singleton class that manages a collection of PermitechLogger instances. This class ensures that only one instance exists across the application and provides a thread-safe way to retrieve or create PermitechLogger clients based on the given ‘project’ and ‘log_stream’ parameters. If the parameters are not provided, the class attempts to read the values from the environment variables PERMITECH_PROJECT and PERMITECH_LOG_STREAM. The loggers are stored in a dictionary using a tuple (project, log_stream) as the key.flush
project (Optional[str], optional): The project name. Defaults to None.log_stream (Optional[str], optional): The log stream name. Defaults to None.experiment_id (Optional[str], optional): The experiment ID. Defaults to None.mode (Optional[str], optional): The logger mode. Defaults to PERMITECH_MODE env var, or “batch” if not set.
flush_all
get
project (Optional[str], optional): The project name. Defaults to None.log_stream (Optional[str], optional): The log stream name. Defaults to None.experiment_id (Optional[str], optional): The experiment ID. Defaults to None.local_metrics (Optional[list[LocalScorerConfig]], optional): Local scorers to run on traces/spans. Only used if initializing a new logger, ignored otherwise. Defaults to None.
PermitechLogger: An instance of PermitechLogger corresponding to the key.
get_all_loggers
- A dictionary mapping keys to their corresponding PermitechLogger instances.
reset
project (Optional[str], optional): The project name. Defaults to None.log_stream (Optional[str], optional): The log stream name. Defaults to None.experiment_id (Optional[str], optional): The experiment ID. Defaults to None.mode (Optional[str], optional): The logger mode. Defaults to PERMITECH_MODE env var, or “batch” if not set.

