Click or drag to resize

HelperFunctionsLogging Class

The Logging Class contains methods to manage a Logfile and helper functions to write to the log file.
Inheritance Hierarchy
SystemObject
  AHLHelperFunctionsLogging

Namespace:  AHL
Assembly:  AHL (in AHL.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public static class Logging

The HelperFunctionsLogging type exposes the following members.

Methods
  NameDescription
Public methodStatic memberInitializeLog
This method defines the Log file. If this is not called, it will be called automatically at the first use.
Public methodStatic memberWriteLog(Exception)
This method enable the programmer to write in an Log the error message receiveed by an Exception passed as argument. If you have not called InitializeLog() to create or to open a specific logfile, a generic one called "LogFile.log" will be created or opened.
Public methodStatic memberWriteLog(String)
This method enable the programmer to write in an Log the message passed as argument. If you have not called InitializeLog() to create or to open a specific logfile, a generic one called "LogFile.log" will be created or opened.
Public methodStatic memberWriteLog(String, Boolean)
This method enable the programmer to write in an Log the message passed as argument. This version also has a boolean value that allows the programmer to log said message if true, or don't if it's false. Passing a static boolean set somewhere else in the code would spare commenting several calls (that wouldn't be efficient of course). If you have not called InitializeLog() to create or to open a specific logfile, a generic one called "LogFile.log" will be created or opened.
Top
See Also

Reference