tidy3d.set_logging_file#

tidy3d.set_logging_file(fname: str, filemode='w', level='info')#

Set a file to write log to, independently from the stdout and stderr output chosen using set_logging_level().

Parameters
  • fname (str) – Path to file to direct the output to.

  • filemode (str = 'w') – ‘w’ or ‘a’, defining if the file should be overwritten or appended.

  • level (str = 'info') – One of ‘debug’, ‘info’, ‘warning’, ‘error’, ‘critical’. This is set for the file independently of the console output level set by set_logging_level().

Example

>>> set_logging_file('tidy3d_log.log')
>>> log.warning('this warning will appear in the tidy3d_log.log')