Hide menu
Loading...
Searching...
No Matches
manufacturingtoolkit.CadExMTK.Utilities_Logger_Sentry Class Reference

Utilities.Logger.Sentry Logger.hxx cadex/Utilities/Logger.hxx. More...

Inheritance diagram for manufacturingtoolkit.CadExMTK.Utilities_Logger_Sentry:

Public Member Functions

 __init__ (self, theHandler)
 Constructor.
 

Detailed Description

Utilities.Logger.Sentry Logger.hxx cadex/Utilities/Logger.hxx.

Helper class to unregister the handler from the logger upon own destruction.

Sentry implements the RAII pattern (Resource Acquisition Is Initialization) and is convenient when an handler's life span is limited to a scope, for example:

{
auto aHandler = std::make_shared<LoggerFileHandler> ("myalgorithm.log");
Logger::Sentry aSentry (aHandler);
RunMyAlgorithm();
}

The documentation for this class was generated from the following file:
  • CadExMTK.py