Configures the logging framework
static bool configure( HINSTANCE hinstance, bool bIgnoreMissingFile, std::basic_string<TCHAR>& strErrorString, bool& bConfigFileWasMissing, std::basic_string<TCHAR>& strConfigFile, bool& bErrorFileWritten, const TCHAR* strErrorFileName, std::basic_string<TCHAR>& strErrorFilePath ); |
The module of the binary file (EXE, DLL or XLL) whose location and name controls the location and name of the configuration file.
If true, then a missing configuration file is not considered an error, and in this event true will be returned. If false, then the configuration file must be present; if it is not found, the function will return false.
If an error occurs, a description of the problem will be placed in this variable, and false will be returned. If no error occurs, strErrorString will be cleared.
This parameter will be set to true if the required configuration file was not found. If the file was found, it will be set to false.
This variable will contain the full path of the configuration file which the configurator searched for, and may have loaded or attempted to load.
This parameter will be set to true if an error occurred, and information about the failure was written to an error file. The full name and path of the error file will be found in strErrorFilePath. If no error occurred, or if no error file name was specified, then, it will be set to false.
The name (excluding path) of an error file where configurator errors will be reported. If this is not specified, then errors will be written only to strErrorString.
If an error occured, and strErrorFileName is specified, then this variable will contain the full path of the error file to which errors were written. The error file will always be located in the current user's temporary directory.
The configuration file is expected to be in the same directory as the executing module.
Its name should be the same as the executing module, with the addition of the suffix
.log.ini
. For example, a module MyLib.dll
will search for a log configuration file MyLib.dll.log.ini
and
a program program.exe
will search for a log configuration file program.exe.log.ini
.
For the format of the configuration file, see Configuration files.
Header: cpplog.h
ModulePropertyConfigurator Class | ModulePropertyConfigurator Methods