Logging

The ThreatConnect TcEx App Framework has a built-in logger that will log to the args.tc_log_path directory. If the App passes args.tc_token and args.tc_log_to_api, the logger will automatically log to the ThreatConnect API. This built-in logger is an instance of the standard Python Logger with modification for API logging.

Note

The args.tc_log_to_api variable is passed only if API Logging is turned on in the System Settings screen, which is accessed in the ThreatConnect platform UI.

Example Logging

1tcex.log.debug('logging debug')
2tcex.log.info('logging info')
3tcex.log.warning('logging warning')
4tcex.log.error('logging error')
5tcex.log.critical('logging critical')