VizLogger
#
- class ansys.tools.visualization_interface.utils.logger.VizLogger(level: int = logging.ERROR, logger_name: str = 'VizLogger')#
Bases:
object
Provides the singleton logger for the visualizer.
Overview#
Get the logger. |
|
Set the logger output level. |
|
Enable logger output to a given stream. |
|
Save logs to a file in addition to printing them to the standard output. |
Import detail#
from ansys.tools.visualization_interface.utils.logger import VizLogger
Method detail#
- VizLogger.get_logger()#
Get the logger.
- Returns:
Logger
Logger.
- VizLogger.set_level(level: int)#
Set the logger output level.
- Parameters:
- level
int
Output Level of the logger.
- level
- VizLogger.enable_output(stream=None)#
Enable logger output to a given stream.
If a stream is not specified,
sys.stderr
is used.- Parameters:
- stream: TextIO, default: ``sys.stderr``
Stream to output the log output to.