Class C Log Writer

(Underscores in the name were replaced by spaces.)
A utility that writes to a log file and/or to a console window for real time viewing.

This class is composed of four files. They are included in the solution: CommonCodeTestUtilities. The solution is a dialog that exercises most of the interfaces with CLogWriter. Build the solution and run it to test and demonstrate the CLog_Writer utility. These four files constitute the utility itself:

CLogWiter.h
CLogWriter.cpp
CTCPFormatWSAText.h
CTCPFormatWSAText.cpp
The solution is just a wrapper to demo and test it.

This utility is for programmers. It provides the ability to write data to a log file in real time.
The class CLogWriter is instantiated with two arguments: (CLogWriter had two underscores as edited here but evidently they have been mistaken for an italics markup. The use of underscore to denote italics is an unfortunate selection.)

1. The directory where the log file are to be written. It must exist before instantiating the utility. For example: C:\LOG_FILES

2. A prefix used for each log file. Example: Myproject. Every log file name will be prefixed by this phrase. Following the prefix, each name will include the date and time the log file is started. An example log file name takes the format: TestLogWriter20140320022-24-08. Time is YYYYMMDDHHMMSS. The user supplied prefix is first so multiple log files can be sorted by user supplied name. Use the Date Modified column to sort by time.

The application then calls: WriteLogFileEntry( yourstring ) once for each entry to be made.

The current time is captured and pre-pended to the string. The new string is written to the log file.

A Console window may be opened with method: OpenConsoleWindow(); When open, all log entries are displayed on the console.

Every 20,000 entries, a new log file is started. That count can be adjusted with constant: LOGFILERESTART_COUNT

The directory and prefix can be changed during run time. The file and console output can be enabled or disabled at run time.

Read file CLogWriter.h and the descriptions for each method.