I am working on a VC++ DLL that uses SWIG (Simplified Wrapper and Interface Generator) for C#. The DLL does not use ATL or MFC, it is set to use only the Standard Windows Libraries. Now because of some memory issues, I want to output formatted messages from functions to a log file. What are the different way to do that? Is there a pre-existing trace class that I can use?
Share
I know just 3 different ways to do it:
Use one of the existing log libraries for C++. This is the most flexible approach since you can profit from many nice features like formatting, different appenders etc
Use OutputDebugString function. This function sends message to the debugger, but does not put it to any file by default.
Implement your own simple logger
I hope this helps.