Buckets:

download
raw
1.14 kB
# Copyright 2025 Softwell S.r.l. - SPDX-License-Identifier: Apache-2.0
"""Logging utilities for the async mail service.
This module provides a centralized logging configuration helper. The actual
logging setup (level, handlers, format) should be configured via
``logging.basicConfig()`` in the main entry point to avoid duplicate handlers.
Example:
Typical usage in a module::
from mail_proxy.logger import get_logger
logger = get_logger("MyModule")
logger.info("Operation completed")
"""
import logging
def get_logger(name: str = "AsyncMailService") -> logging.Logger:
"""Retrieve a configured logger instance.
This function returns a standard library logger with the specified name.
It does not configure handlers or formatters; that responsibility lies
with the application entry point.
Args:
name: The logger name. Defaults to "AsyncMailService".
Returns:
A ``logging.Logger`` instance bound to the given name.
Example:
>>> logger = get_logger("smtp")
>>> logger.info("Connection established")
"""
return logging.getLogger(name)

Xet Storage Details

Size:
1.14 kB
·
Xet hash:
0cd36ab890202b18e2c8e3aec7d183b820fbacc268722f584b3d05a68e9de031

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.