I am a supporter of
St. Joseph's hospice.
 If you find this site useful or if it helped you, consider a small donation to
St. Joseph's, please.

Information on
St. Joseph's

JustGiving - Sponsor me now!





LoggerFactory contains constants, public variables, and a default logger setting.

Class module

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.


Compiler constants

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.

Logging variables

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)

See Also
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]

Sulprobil   Get it done   Contact   Disclaimer   Impressum   Download