C3D Toolkit
Kernel - 117982, Vision - 2.9.2.2
|
Logging switch in a scope. More...
#include <tool_log.h>
Logging switch in a scope.
Helper class for the logging in the scope. The logging starts in the constructor and ends in the destructor. If a file name was defined in the constructor, then before ending the logging, the destructor writes the collected log to the file. Example of use: { Start logging, the log will be written to the file myLogFile.log. c3d::LogHelper log( true, _T("myLogFile") );
Put a specified string to the log. LOG_MSG( _T("My formatted message") ); ... Format a log line and put it to the log using the operator << Logger::Endl. c3d::Logger::Get() << _T("Value ") << k << Logger::Endl; ... } // When leaving the code scope the logging stops and the log is written to the file.