pyaedt.aedt_logger.AedtLogger

class pyaedt.aedt_logger.AedtLogger(level=10, filename=None, to_stdout=False)[source]

Specifies the logger to use for each AEDT logger.

This class allows you to add a handler to write messages to a file and to indicate whether to write mnessages to the standard output (stdout).

Parameters
levelint, optional

Logging level to filter the message severity allowed in the logger. The default is logging.DEBUG.

filenamestr, optional

Name of the file to write messages to. The default is None.

to_stdoutbool, optional

Whether to write log messages to stdout. The default is False.

Methods

AedtLogger.add_debug_message(message_type, ...)

Parameterized message to the message manager to specify the type and project or design level.

AedtLogger.add_error_message(message_text[, ...])

Add a type 2 "Error" message to the message manager tree.

AedtLogger.add_info_message(message_text[, ...])

Add a type 0 "Info" message to the active design level of the message manager tree.

AedtLogger.add_logger(destination[, level])

Add a logger for either the active project or active design.

AedtLogger.add_message(message_type, ...[, ...])

Add a message to the message manager to specify the type and project or design level.

AedtLogger.add_warning_message(message_text)

Add a type 1 "Warning" message to the message manager tree.

AedtLogger.clear_messages([proj_name, ...])

Clear all messages.

AedtLogger.debug(msg, *args, **kwargs)

Write a debug message to the global logger.

AedtLogger.disable_desktop_log()

Disable the log in AEDT.

AedtLogger.disable_log_on_file()

Disable writing log messages to an output file.

AedtLogger.disable_stdout_log()

Disable printing log messages to stdout.

AedtLogger.enable_desktop_log()

Enable the log in AEDT.

AedtLogger.enable_log_on_file()

Enable writing log messages to an output file.

AedtLogger.enable_stdout_log()

Enable printing log messages to stdout.

AedtLogger.error(msg, *args, **kwargs)

Write an error message to the global logger.

AedtLogger.get_messages([project_name, ...])

Retrieve the message manager content for a specified project and design.

AedtLogger.info(msg, *args, **kwargs)

Write an info message to the global logger.

AedtLogger.warning(msg, *args, **kwargs)

Write a warning message to the global logger.

Attributes

AedtLogger.design

Design logger.

AedtLogger.glb

Global logger.

AedtLogger.logger

Aedt Logger object.

AedtLogger.messages

Message manager content for the active project and design.

AedtLogger.project

Project logger.