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