NCBI C++ ToolKit
|
Search Toolkit Book for CDiagCollectGuard
Guard for collecting diag messages (affects the current thread only). More...
#include <corelib/ncbidiag.hpp>
Public Types | |
enum | EAction { ePrint , eDiscard , ePrintCapped } |
Action to perform in guard's destructor. More... | |
Public Member Functions | |
CDiagCollectGuard (void) | |
Set collectable severity and optionally applied print-severity cap to the current post level, Print severity is set to critical. More... | |
CDiagCollectGuard (EDiagSev print_severity) | |
Set collectable severity and optionally applied print-severity cap to the current post level, Print severity is set to the specified value but can be ignored if it's lower than the currently set post level (or print severity set by a higher level guard). More... | |
CDiagCollectGuard (EDiagSev print_severity, EDiagSev collect_severity, EAction action=eDiscard) | |
Create diag collect guard with the given severities and action. More... | |
~CDiagCollectGuard (void) | |
Destroy the guard, return post level to the one set before the guard initialization. More... | |
EDiagSev | GetPrintSeverity (void) const |
Get current print severity. More... | |
void | SetPrintSeverity (EDiagSev sev) |
Set new print severity. More... | |
EDiagSev | GetCollectSeverity (void) const |
Get current collect severity. More... | |
void | SetCollectSeverity (EDiagSev sev) |
Set new collect severity. More... | |
EDiagSev | GetSeverityCap (void) const |
Get current severity cap for use in ePrintCapped mode. More... | |
void | SetSeverityCap (EDiagSev sev) |
Set new severity cap for use in PrintCapped mode. More... | |
EAction | GetAction (void) const |
Get selected on-destroy action. More... | |
void | SetAction (EAction action) |
Specify on-destroy action. More... | |
Uint8 | GetStartingPoint (void) const |
Get the lowest thread-local post number in this guard's scope. More... | |
void | Release (void) |
Release the guard. More... | |
void | Release (EAction action) |
Release the guard. More... | |
Private Member Functions | |
void | x_Init (EDiagSev print_severity, EDiagSev collect_severity, EAction action) |
Private Attributes | |
Uint8 | m_StartingPoint |
EDiagSev | m_PrintSev |
EDiagSev | m_CollectSev |
EDiagSev | m_SeverityCap |
EAction | m_Action |
Guard for collecting diag messages (affects the current thread only).
Messages with the severity equal or above 'print' severity will be printed but not collected. Messages having severity below 'print' severity and equal or above 'collect' severity will be collected, and later can be either discarded or printed out upon the guard destruction or when Release() is called.
Definition at line 1299 of file ncbidiag.hpp.