log_to_file#
- Logger.log_to_file(filename='pymapdl.log', level=10)#
Add file handler to logger.
- Parameters:
- Return type:
Examples
Write to
pymapdl.log
in the current working directory.>>> from ansys.mapdl.core import LOG >>> import os >>> file_path = os.path.join(os.getcwd(), 'pymapdl.log') >>> LOG.log_to_file(file_path)