get_logger#

ansys.dynamicreporting.core.adr_utils.get_logger(logfile: str | PathLike[str] | None = None, *, log_output: str | PathLike[str] | None = None, log_level: int | str | None = None) Logger#

Return the ansys.dynamicreporting.core package logger.

ADR uses its own logger and does not change the root logger. By default ADR adds a NullHandler and leaves the logging level unchanged. Pass log_output to add a file or stdout handler, and pass log_level to set the shared ADR logger’s level explicitly.

Parameters:
logfilestr or os.PathLike, optional

Deprecated alias for log_output. Passing it emits DeprecationWarning.

log_outputstr or os.PathLike, optional

Where to send ADR logs. "stdout" writes to standard output. Any other value is used as a file path. None adds no output handler.

log_levelint or str, optional

Level for the shared ADR logger. None leaves its current level unchanged.

Returns:
logging.Logger

The ansys.dynamicreporting.core package logger.

Raises:
ValueError

If both logfile and log_output are provided.

Notes

Repeated calls do not add duplicate ADR-owned handlers for the same standard-output stream or normalized file path.