Two
additional pieces of information for you:
1.
You may uncomment the log collector code in my example. I have discovered
the cause of my issue in the log collector code and it has nothing to do with
the code in my example. The code I have will work as long as you change
the directory in vFileName to be different that of vTarget. Note that the
value of vTarget is the name of the directory where the collected log files will
be stored. Having the collector code means you can restrict the total size
of the collected log files to the value of vMaxSize. Older logs will be
discarded when required.
2.
I was originally using a C++11 compiler thus I had auto on vRotationSize,
vMaxSize, vSeverity, pCore and rLogger. I’m just not sure if I didn’t make
a mistake in specifying the right types for C++03.
I
hope this info is any use to you.