LoggerFactory contains constants, public variables, and a default logger setting.
Logger contains the logging functionality.
This Logger class enables message logging with severities INFO, WARN, FATAL, and ALWAYS to a log file as well as to an Excel sheet.
Logging_on_Screen - Set to True if you want to log messages also to sheet Workflow (screen).
Logging_cashed - Set to True if you want to speed up the application by writing log messages in one go to the log file at
program end. This requires Logging_on_Screen set to True.
LogFilePath - Full pathname of log file
SubName - Set at the beginning of each subroutine to enable the logger to report on the right subroutine name
LogLevel - The level from where logging should be done:
1 - Report all log messages: INFO, WARN, FATAL, and ALWAYS
2 - Report all log messages but not INFOs
3 - Report from FATAL level onwards, i. e. just FATAL and ALWAYS messages
4 - Report only ALWAYS messages
5 - Switch off logging
LogScreenRow - Row from where to start logging in sheet Workflow (usually 3)
A similar logging function for MS PowerShell
Logging.xlsm [46 KB Excel 2016 © file, open and use at your own risk, please read my disclaimer]