Hi,
Formatter change (in formatter.hpp):
The ErrorDescription() was made virtual. This way its implementation cans be overridden.
I need this option since I added a new level named 'trace' and I would like the overriding implementation of ErrorDescription() to print the new level name.
1) I added a new 'nUsageModes' parameter to the constructor. The parameter has a default value of 0 (i.e.: the change is backwards compatiable), and its value can be any combination of the following bits (defined in a new enum:
LOG_FILE_CREATE_NEW = 1 : If set, and the file already exists, it is overridden (instead of appended to). LOG_FILE_SHARE_FOR_READ = 2 : If set, the file can be accessed for reading while it is being used by the logger. This flag is relevant only for WINDOWS flavor. LOG_FILE_FLUSH_EACH_WRITE = 4 : If set, the file is flushed after each time it written to (at the end of the Output() method).
This way it is possible to call the open() method directly instead of waiting for it to be called from the Output() method at the first time it is being called.