Collaboration diagram for Run-Time Diagnostics:
|
Classes | |
| class | CDiagCompileInfo |
| Incapsulate compile time information such as _FILE_ _LINE NCBI_MODULE NCBI_MODULE is used only in .cpp file. More... | |
| struct | WRONG_ERROR_SUBCODE_IN_POST_MACRO< errorCode, errorSubcode, maxErrorSubcode, false > |
| Specialization of template: when error subcode is valid existence of this specialization will be valuable for not issuing compiler error. More... | |
| struct | WRONG_USAGE_OF_DEFINE_ERR_SUBCODE_MACRO< errorCode, false > |
| Specialization of template: when usage of NCBI_DEFINE_ERR_SUBCODE_X is correct existence of this specialization will be valuable for not issuing compiler error. More... | |
| class | ErrCode |
| ErrCode --. More... | |
| class | Severity |
| Severity --. More... | |
| class | MDiagModule |
| MDiagModule --. More... | |
| class | MDiagClass |
| MDiagClass --. More... | |
| class | MDiagFunction |
| MDiagFunction --. More... | |
| class | CNcbiDiag |
| CNcbiDiag --. More... | |
| class | CDiagCollectGuard |
| Guard for collecting diag messages (affects the current thread only). More... | |
| class | CDiagAutoPrefix |
| CDiagAutoPrefix --. More... | |
| class | INextDiagMessage |
| Callback interface for stream parser. More... | |
| struct | SDiagMessage |
| SDiagMessage --. More... | |
| class | CDiagContextThreadData |
| Thread local context data stored in TLS. More... | |
| class | CDiagContext_Extra |
| Temporary object for holding extra message arguments. More... | |
| class | CDiagContext |
| class | CDiagHandler |
| CDiagHandler --. More... | |
| class | CStreamDiagHandler_Base |
| CStreamDiagHandler_Base --. More... | |
| class | CStreamDiagHandler |
| CStreamDiagHandler --. More... | |
| class | CFileHandleDiagHandler |
| CFileHandleDiagHandler --. More... | |
| class | CFileDiagHandler |
| class | CDiagFactory |
| CDiagFactory --. More... | |
| class | CDiagRestorer |
| CDiagRestorer --. More... | |
| struct | SDiagErrCodeDescription |
| SDiagErrCodeDescription --. More... | |
| class | CDiagErrCodeInfo |
| CDiagErrCodeInfo --. More... | |
| class | CRequestContext |
| class | CRequestStatus |
| class | CSysLog |
Defines | |
| #define | NCBI_CURRENT_FUNCTION NCBI_NS_NCBI::g_DiagUnknownFunction() |
| Get current function name. | |
| #define | NCBI_MAKE_MODULE(module) NCBI_AS_STRING(module) |
| Set default module name based on NCBI_MODULE macro. | |
| #define | DIAG_COMPILE_INFO |
| Make compile time diagnostic information object to use in CNcbiDiag and CException. | |
| #define | ERR_POST(message) |
| Error posting with file, line number information but without error codes. | |
| #define | LOG_POST(message) |
| Log message only without severity, location, prefix information. | |
| #define | ERR_POST_EX(err_code, err_subcode, message) |
| Error posting with error codes. | |
| #define | LOG_POST_EX(err_code, err_subcode, message) |
| Log posting with error codes. | |
| #define | NCBI_DEFINE_ERRCODE_X(name, err_code, max_err_subcode) |
| Define global error code name with given value (err_code) and given maximum value of error subcode within this code. | |
| #define | NCBI_DEFINE_ERR_SUBCODE_X(max_err_subcode) NCBI_DEFINE_ERR_SUBCODE_XX(NCBI_USE_ERRCODE_X, max_err_subcode) |
| Define maximum value of subcode for the error code currently in use. | |
| #define | NCBI_DEFINE_ERR_SUBCODE_XX(name, max_err_subcode) |
| Define maximum value of subcode for particular error code name. | |
| #define | NCBI_ERRCODE_X_NAME(name) NCBI_NS_NCBI::err_code_x::NCBI_NAME2(eErrCodeX_, name) |
| Returns value of error code by its name defined by NCBI_DEFINE_ERRCODE_X. | |
| #define | NCBI_ERRCODE_X NCBI_ERRCODE_X_NAME(NCBI_USE_ERRCODE_X) |
| Returns currently set default error code. | |
| #define | NCBI_MAX_ERR_SUBCODE_X_NAME(name) NCBI_NS_NCBI::err_code_x::NCBI_NAME2(SErrCodeX_Max_, name)<true>::value |
| Returns maximum value of error subcode within error code with given name. | |
| #define | NCBI_MAX_ERR_SUBCODE_X NCBI_MAX_ERR_SUBCODE_X_NAME(NCBI_USE_ERRCODE_X) |
| Returns maximum value of error subcode within current default error code. | |
| #define | NCBI_CHECK_ERRCODE_USAGE(name) |
| Check that NCBI_DEFINE_ERR_SUBCODE_X is used for correctly defined error code. | |
| #define | NCBI_CHECK_ERR_SUBCODE_X_NAME(name, subcode) |
| Issue compile-time error if error subcode given is not valid for given error code name. | |
| #define | NCBI_CHECK_ERR_SUBCODE_X(subcode) NCBI_CHECK_ERR_SUBCODE_X_NAME(NCBI_USE_ERRCODE_X, subcode) |
| Issue compile-time error if error subcode given is not valid for current error code. | |
| #define | ERR_POST_X(err_subcode, message) ERR_POST_XX(NCBI_USE_ERRCODE_X, err_subcode, message) |
| Error posting with default error code and given error subcode. | |
| #define | LOG_POST_X(err_subcode, message) LOG_POST_XX(NCBI_USE_ERRCODE_X, err_subcode, message) |
| Log posting with default error code and given error subcode. | |
| #define | ERR_POST_XX(error_name, err_subcode, message) |
| Error posting with error code having given name and with given error subcode. | |
| #define | LOG_POST_XX(error_name, err_subcode, message) |
| Log posting with error code having given name and with given error subcode. | |
| #define | NCBI_REPEAT_POST_N_TIMES(post_macro, count, params) |
| Common code for making log or error posting only given number of times during program execution. | |
| #define | LOG_POST_N_TIMES(count, message) NCBI_REPEAT_POST_N_TIMES( LOG_POST, count, (message) ) |
| Log posting only given number of times during program execution. | |
| #define | ERR_POST_N_TIMES(count, message) NCBI_REPEAT_POST_N_TIMES( ERR_POST, count, (message) ) |
| Error posting only given number of times during program execution. | |
| #define | LOG_POST_ONCE(message) LOG_POST_N_TIMES(1, message) |
| Log posting only once during program execution. | |
| #define | ERR_POST_ONCE(message) ERR_POST_N_TIMES(1, message) |
| Error posting only once during program execution. | |
| #define | LOG_POST_X_N_TIMES(count, err_subcode, message) NCBI_REPEAT_POST_N_TIMES( LOG_POST_X, count, (err_subcode, message) ) |
| Log posting only given number of times during program execution with default error code and given error subcode. | |
| #define | ERR_POST_X_N_TIMES(count, err_subcode, message) NCBI_REPEAT_POST_N_TIMES( ERR_POST_X, count, (err_subcode, message) ) |
| Error posting only given number of times during program execution with default error code and given error subcode. | |
| #define | LOG_POST_X_ONCE(err_subcode, message) LOG_POST_X_N_TIMES(1, err_subcode, message) |
| Log posting only once during program execution with default error code and given error subcode. | |
| #define | ERR_POST_X_ONCE(err_subcode, message) ERR_POST_X_N_TIMES(1, err_subcode, message) |
| Error posting only once during program execution with default error code and given error subcode. | |
| #define | LOG_POST_XX_N_TIMES(count, error_name, err_subcode, message) |
| Log posting only given number of times during program execution with given error code name and given error subcode. | |
| #define | ERR_POST_XX_N_TIMES(count, error_name, err_subcode, message) |
| Error posting only given number of times during program execution with given error code name and given error subcode. | |
| #define | LOG_POST_XX_ONCE(error_name, err_subcode, message) LOG_POST_XX_N_TIMES(1, error_name, err_subcode, message) |
| Log posting only once during program execution with given error code name and given error subcode. | |
| #define | ERR_POST_XX_ONCE(error_name, err_subcode, message) ERR_POST_XX_N_TIMES(1, error_name, err_subcode, message) |
| Error posting only once during program execution with given error code name and given error subcode. | |
| #define | DIAG_POST_LEVEL "DIAG_POST_LEVEL" |
| Diagnostic post severity level. | |
| #define | DIAG_TRACE "DIAG_TRACE" |
| Diagnostic trace setting. | |
| #define | DIAG_MESSAGE_FILE "MessageFile" |
| Diagnostic message file. | |
Typedefs | |
| typedef int | TDiagUserAndHost |
| typedef int | TDiagPostFlags |
| Binary OR of "EDiagPostFlag". | |
| typedef void(* | FAbortHandler )(void) |
| Abort handler function type. | |
| typedef void(* | FDiagHandler )(const SDiagMessage &mess) |
| Diagnostic handler function type. | |
| typedef void(* | FDiagCleanup )(void *data) |
| Diagnostic cleanup function type. | |
| typedef map< string, string > | CRequestContext::TProperties |
| User-defined request properties. | |
| typedef int | CRequestContext::TPropSet |
| typedef CSysLog | CSysLogDiagHandler |
Enumerations | |
| enum | EDiagUserAndHost { fDiag_AddUser = 1 << 0, fDiag_AddHost = 1 << 1, fDiag_OverrideExisting = 1 << 2 } |
| Flags for SetDiagUserAndHost(). More... | |
| enum | EDiagSev { eDiag_Info = 0, eDiag_Warning, eDiag_Error, eDiag_Critical, eDiag_Fatal, eDiag_Trace, eDiagSevMin = eDiag_Info, eDiagSevMax = eDiag_Trace } |
| Severity level for the posted diagnostics. More... | |
| enum | EDiagSevChange { eDiagSC_Unknown, eDiagSC_Disable, eDiagSC_Enable } |
| Severity level change state. More... | |
| enum | EDiagPostFlag { eDPF_File = 0x1, eDPF_LongFilename = 0x2, eDPF_Line = 0x4, eDPF_Prefix = 0x8, eDPF_Severity = 0x10, eDPF_ErrorID = 0x20, eDPF_DateTime = 0x80, eDPF_ErrCodeMessage = 0x100, eDPF_ErrCodeExplanation = 0x200, eDPF_ErrCodeUseSeverity = 0x400, eDPF_Location = 0x800, eDPF_PID = 0x1000, eDPF_TID = 0x2000, eDPF_SerialNo = 0x4000, eDPF_SerialNo_Thread = 0x8000, eDPF_RequestId = 0x10000, eDPF_Iteration = 0x10000, eDPF_UID = 0x20000, eDPF_ErrCode = eDPF_ErrorID, eDPF_ErrSubCode = eDPF_ErrorID, eDPF_All = 0xFFFFF, eDPF_Trace = 0x581F, eDPF_Log = 0x0, eDPF_PreMergeLines = 0x100000, eDPF_MergeLines = 0x200000, eDPF_OmitInfoSev = 0x400000, eDPF_OmitSeparator = 0x800000, eDPF_AppLog = 0x1000000, eDPF_IsMessage = 0x2000000, eDPF_AtomicWrite = 0x4000000, eDPF_Default = 0x10000000, eDPF_ImportantFlagsMask, eDPF_UseExactUserFlags = 0x20000000 } |
| Which parts of the diagnostic context should be posted. More... | |
| enum | EDiagAppState { eDiagAppState_NotSet, eDiagAppState_AppBegin, eDiagAppState_AppRun, eDiagAppState_AppEnd, eDiagAppState_RequestBegin, eDiagAppState_Request, eDiagAppState_RequestEnd } |
| Application execution states shown in the std prefix. More... | |
| enum | EDiagTrace { eDT_Default = 0, eDT_Disable, eDT_Enable } |
| Which setting disables/enables posting of "eDiag_Trace" messages. More... | |
| enum | EAppDiagStream { eDS_ToStdout, eDS_ToStderr, eDS_ToStdlog, eDS_ToMemory, eDS_Disable, eDS_User, eDS_AppSpecific, eDS_Default, eDS_ToSyslog } |
| Where to write the application's diagnostics to. More... | |
| enum | EDiagCollectMessages { eDCM_Init, eDCM_InitNoLimit, eDCM_NoChange, eDCM_Flush, eDCM_Discard } |
| Flags to control collecting messages and flushing them to the new destination when switching diag handlers. More... | |
| enum | EPostNumberIncrement { ePostNumber_NoIncrement, ePostNumber_Increment } |
| Post nubmer increment flag for GetProcessPostNumber() and GetThreadPostNumber(). More... | |
| enum | EDiagFilter { eDiagFilter_Trace, eDiagFilter_Post, eDiagFilter_All } |
| Diag severity types to put the filter on. More... | |
| enum | EDiagFileType { eDiagFile_Err, eDiagFile_Log, eDiagFile_Trace, eDiagFile_All } |
| Type of file for the output. More... | |
| enum | CRequestContext::EProperty { CRequestContext::eProp_RequestID = 1 << 0, CRequestContext::eProp_ClientIP = 1 << 1, CRequestContext::eProp_SessionID = 1 << 2, CRequestContext::eProp_HitID = 1 << 3, CRequestContext::eProp_ReqStatus = 1 << 4, CRequestContext::eProp_BytesRd = 1 << 5, CRequestContext::eProp_BytesWr = 1 << 6 } |
Functions | |
| void | SetDiagUserAndHost (TDiagUserAndHost flags=fDiag_AddUser|fDiag_AddHost) |
| Set username and hostname properties for the diag context. | |
| const char * | g_DiagUnknownFunction (void) |
| void | CheckErrSubcodeX (int) |
| Additional dummy function for use in NCBI_CHECK_ERR_SUBCODE_X macro. | |
| bool | IsSetDiagPostFlag (EDiagPostFlag flag, TDiagPostFlags flags=eDPF_Default) |
| Check if a specified flag is set. | |
| TDiagPostFlags | SetDiagPostAllFlags (TDiagPostFlags flags) |
| Set global post flags to "flags". | |
| void | SetDiagPostFlag (EDiagPostFlag flag) |
| Set the specified flag (globally). | |
| void | UnsetDiagPostFlag (EDiagPostFlag flag) |
| Unset the specified flag (globally). | |
| TDiagPostFlags | SetDiagTraceAllFlags (TDiagPostFlags flags) |
| Versions of the above for extra trace flags. | |
| void | SetDiagTraceFlag (EDiagPostFlag flag) |
| void | UnsetDiagTraceFlag (EDiagPostFlag flag) |
| void | SetDiagPostPrefix (const char *prefix) |
| Specify a string to prefix all subsequent error postings with. | |
| void | PushDiagPostPrefix (const char *prefix) |
| Push a string to the list of message prefixes. | |
| void | PopDiagPostPrefix (void) |
| Pop a string from the list of message prefixes. | |
| int | GetDiagRequestId (void) |
| Get iteration number/request ID. | |
| void | SetDiagRequestId (int id) |
| Set iteration number/request ID. | |
| NCBI_DEPRECATED int | GetFastCGIIteration (void) |
| NCBI_DEPRECATED void | SetFastCGIIteration (int id) |
| EDiagSev | SetDiagPostLevel (EDiagSev post_sev=eDiag_Error) |
| Set the threshold severity for posting the messages. | |
| int | CompareDiagPostLevel (EDiagSev sev1, EDiagSev sev2) |
| Compare two severities. | |
| bool | IsVisibleDiagPostLevel (EDiagSev sev) |
| Check if the specified severity is higher or equal to the currently selected post level and will be printed by LOG_POST/ERR_POST. | |
| bool | DisableDiagPostLevelChange (bool disable_change=true) |
| Disable change the diagnostic post level. | |
| void | SetDiagFixedPostLevel (EDiagSev post_sev) |
| Sets and locks the level, combining the previous two calls. | |
| EDiagSev | SetDiagDieLevel (EDiagSev die_sev=eDiag_Fatal) |
| Set the "die" (abort) level for the program. | |
| bool | IgnoreDiagDieLevel (bool ignore) |
| Ignore the die level settings. | |
| void | SetAbortHandler (FAbortHandler func=0) |
| Set/unset abort handler. | |
| void | Abort (void) |
| Smart abort function. | |
| void | SetDiagTrace (EDiagTrace how, EDiagTrace dflt=eDT_Default) |
| Set the diagnostic trace settings. | |
| CNcbiOstream & | operator<< (CNcbiOstream &os, const SDiagMessage &mess) |
| Insert message in output stream. | |
| CDiagContext & | GetDiagContext (void) |
| Get diag context instance. | |
| void | SetDiagHandler (CDiagHandler *handler, bool can_delete=true) |
| Set the diagnostic handler using the specified diagnostic handler class. | |
| CDiagHandler * | GetDiagHandler (bool take_ownership=false) |
| Get the currently set diagnostic handler class. | |
| void | SetDiagHandler (FDiagHandler func, void *data, FDiagCleanup cleanup) |
| Set the diagnostic handler using the specified diagnostic handler and cleanup functions. | |
| bool | IsSetDiagHandler (void) |
| Check if diagnostic handler is set. | |
| void | DiagHandler_Reopen (void) |
| Ask diagnostic handler to reopen log files if necessary. | |
| void | SetDiagFilter (EDiagFilter what, const char *filter_str) |
| Set diagnostic filter. | |
| NCBI_DEPRECATED void | SetDoubleDiagHandler (void) |
| Output diagnostics using both old and new style handlers. | |
| void | SetDiagStream (CNcbiOstream *os, bool quick_flush=true, FDiagCleanup cleanup=0, void *cleanup_data=0, const string &stream_name="STREAM") |
| Set diagnostic stream. | |
| bool | IsDiagStream (const CNcbiOstream *os) |
| CNcbiOstream * | GetDiagStream (void) |
| Get current diagnostic stream (if it was set by SetDiagStream) or NULL. | |
| void | SetSplitLogFile (bool value=true) |
| Split log files flag. | |
| bool | GetSplitLogFile (void) |
| Get split log files flag. | |
| bool | SetLogFile (const string &file_name, EDiagFileType file_type=eDiagFile_All, bool quick_flush=true) |
| Set log files. | |
| string | GetLogFile (EDiagFileType file_type) |
| Get log file name for the given log type. | |
| string | GetLogFile (void) |
| Get log file name or diag handler name. | |
| void | SetDiagErrCodeInfo (CDiagErrCodeInfo *info, bool can_delete=true) |
| Set handler for processing error codes. | |
| bool | IsSetDiagErrCodeInfo () |
| Indicates whether an error-code processing handler has been set. | |
| CDiagErrCodeInfo * | GetDiagErrCodeInfo (bool take_ownership=false) |
| Get handler for processing error codes. | |
| virtual | CRequestContext::~CRequestContext (void) |
| int | CRequestContext::GetRequestID (void) const |
| Get request ID (or zero if not set). | |
| void | CRequestContext::SetRequestID (int rid) |
| Set request ID. | |
| bool | CRequestContext::IsSetRequestID (void) const |
| Check if request ID was assigned a value. | |
| void | CRequestContext::UnsetRequestID (void) |
| Reset request ID. | |
| int | CRequestContext::SetRequestID (void) |
| Assign the next available request ID to this request. | |
| static int | CRequestContext::GetNextRequestID (void) |
| Return the next available application-wide request ID. | |
| EDiagAppState | CRequestContext::GetAppState (void) const |
| Application state. | |
| void | CRequestContext::SetAppState (EDiagAppState state) |
| const string & | CRequestContext::GetClientIP (void) const |
| Client IP/hostname. | |
| void | CRequestContext::SetClientIP (const string &client) |
| bool | CRequestContext::IsSetClientIP (void) const |
| void | CRequestContext::UnsetClientIP (void) |
| const string & | CRequestContext::GetSessionID (void) const |
| Session ID. | |
| void | CRequestContext::SetSessionID (const string &session) |
| bool | CRequestContext::IsSetSessionID (void) const |
| void | CRequestContext::UnsetSessionID (void) |
| const string & | CRequestContext::SetSessionID (void) |
| Create and set new session ID. | |
| const string & | CRequestContext::GetEncodedSessionID (void) const |
| Get URL-encoded session ID. | |
| const string & | CRequestContext::GetHitID (void) const |
| Hit ID. | |
| void | CRequestContext::SetHitID (const string &hit) |
| bool | CRequestContext::IsSetHitID (void) const |
| void | CRequestContext::UnsetHitID (void) |
| const string & | CRequestContext::SetHitID (void) |
| Generate unique hit id, assign it to this request, return the hit id value. | |
| int | CRequestContext::GetRequestStatus (void) const |
| Request exit startus. | |
| void | CRequestContext::SetRequestStatus (int status) |
| void | CRequestContext::SetRequestStatus (CRequestStatus::ECode code) |
| bool | CRequestContext::IsSetRequestStatus (void) const |
| void | CRequestContext::UnsetRequestStatus (void) |
| const CStopWatch & | CRequestContext::GetRequestTimer (void) const |
| Request execution timer. | |
| CStopWatch & | CRequestContext::GetRequestTimer (void) |
| Int8 | CRequestContext::GetBytesRd (void) const |
| Bytes read. | |
| void | CRequestContext::SetBytesRd (Int8 bytes) |
| bool | CRequestContext::IsSetBytesRd (void) const |
| void | CRequestContext::UnsetBytesRd (void) |
| Int8 | CRequestContext::GetBytesWr (void) const |
| Bytes written. | |
| void | CRequestContext::SetBytesWr (Int8 bytes) |
| bool | CRequestContext::IsSetBytesWr (void) const |
| void | CRequestContext::UnsetBytesWr (void) |
| void | CRequestContext::Reset (void) |
| Reset all properties to the initial state. | |
| void | CRequestContext::SetProperty (const string &name, const string &value) |
| Add/change property. | |
| const string & | CRequestContext::GetProperty (const string &name) const |
| Get property value or empty string. | |
| bool | CRequestContext::IsSetProperty (const string &name) const |
| Check if the property has a value (even if it's an empty string). | |
| void | CRequestContext::UnsetProperty (const string &name) |
| Remove property from the map. | |
| const TProperties & | CRequestContext::GetProperties (void) const |
| Get all properties (read only). | |
| TProperties & | CRequestContext::GetProperties (void) |
| Get all properties (non-const). | |
| void | CRequestContext::SetAutoIncRequestIDOnPost (bool enable) |
| Auto-increment request ID with every posted message. | |
| bool | CRequestContext::GetAutoIncRequestIDOnPost (void) const |
| Get auto-increment state. | |
| static void | CRequestContext::SetDefaultAutoIncRequestIDOnPost (bool enable) |
| Set default auto-increment flag used for each default request context. | |
| static bool | CRequestContext::GetDefaultAutoIncRequestIDOnPost (void) |
| Get default auto-increment flag. | |
| CRequestContext::CRequestContext (const CRequestContext &) | |
| CRequestContext & | CRequestContext::operator= (const CRequestContext &) |
| void | CRequestContext::StartRequest (void) |
| void | CRequestContext::StopRequest (void) |
| bool | CRequestContext::IsRunning (void) const |
| bool | CRequestContext::x_IsSetProp (EProperty prop) const |
| void | CRequestContext::x_SetProp (EProperty prop) |
| void | CRequestContext::x_UnsetProp (EProperty prop) |
| static bool & | CRequestContext::sx_GetDefaultAutoIncRequestIDOnPost (void) |
Variables | |
| int | CRequestContext::m_RequestID |
| EDiagAppState | CRequestContext::m_AppState |
| string | CRequestContext::m_ClientIP |
| CEncodedString | CRequestContext::m_SessionID |
| string | CRequestContext::m_HitID |
| int | CRequestContext::m_ReqStatus |
| CStopWatch | CRequestContext::m_ReqTimer |
| Int8 | CRequestContext::m_BytesRd |
| Int8 | CRequestContext::m_BytesWr |
| TProperties | CRequestContext::m_Properties |
| TPropSet | CRequestContext::m_PropSet |
| bool | CRequestContext::m_IsRunning |
| bool | CRequestContext::m_AutoIncOnPost |
|
|
|
Diagnostic message file.
Definition at line 2644 of file ncbidiag.hpp. |
|
|
Diagnostic post severity level. The value of DIAG_POST_LEVEL can be a digital value (0-9) or string value from CDiagBuffer::sm_SeverityName[]. Definition at line 1337 of file ncbidiag.hpp. |
|
|
Diagnostic trace setting.
Definition at line 1419 of file ncbidiag.hpp. Referenced by CNcbiApplication::x_HonorStandardSettings(). |
|
|
|
Value: ( NCBI_NS_NCBI::CNcbiDiag(DIAG_COMPILE_INFO).GetRef() \ << NCBI_NS_NCBI::ErrCode( (err_code), (err_subcode) ) \ << message \ << NCBI_NS_NCBI::Endm ) This macro should be used only when you need to make non-constant error subcode. In all other cases it's strongly recomended to move in all projects (except tests) to macro ERR_POST_X to make possible more flexible error statistics and logging.
Definition at line 202 of file ncbidiag.hpp. Referenced by CAlignFormatUtil::BlastPrintError(), and AbstractLexer::LexerWarning(). |
|
|
Error posting only given number of times during program execution.
Definition at line 565 of file ncbidiag.hpp. |
|
|
Error posting only once during program execution.
Definition at line 572 of file ncbidiag.hpp. Referenced by CNcbiRegistry::x_Init(), CDiagContext::x_PrintMessage(), and CDiagContext::x_StartRequest(). |
|
|
|
Error posting only given number of times during program execution with default error code and given error subcode.
Definition at line 586 of file ncbidiag.hpp. |
|
|
Error posting only once during program execution with default error code and given error subcode.
Definition at line 600 of file ncbidiag.hpp. Referenced by impl::CConnection::CheckCanOpen(), CDiagContext::SetupDiag(), CObjectOStream::SetVerifyDataGlobal(), and CObjectOStream::SetVerifyDataThread(). |
|
|
Value: ( (NCBI_CHECK_ERR_SUBCODE_X_NAME(error_name, err_subcode)), \ ERR_POST_EX(NCBI_ERRCODE_X_NAME(error_name), err_subcode, message) ) Macro must be placed in headers instead of ERR_POST_X to not confuse default error codes used in sources where this header is included.
Definition at line 532 of file ncbidiag.hpp. Referenced by CBlobStorage_NetCache::CreateOStream(), CThreadInPool< TRequest >::Main(), CBlobStorage_NetCache::Reset(), CBDB_RangeMap< TBV >::~CBDB_RangeMap(), CLockVector< BV >::~CLockVector(), CLockVectorGuard< TLockVect >::~CLockVectorGuard(), and CPoolOfThreads< TRequest >::~CPoolOfThreads(). |
|
|
Value: NCBI_REPEAT_POST_N_TIMES( ERR_POST_XX, count, \ (error_name, err_subcode, message) )
Definition at line 616 of file ncbidiag.hpp. |
|
|
Error posting only once during program execution with given error code name and given error subcode.
Definition at line 631 of file ncbidiag.hpp. |
|
|
|
Value: ( NCBI_NS_NCBI::CNcbiDiag(eDiag_Error, \ eDPF_Log | eDPF_IsMessage).GetRef() \ << NCBI_NS_NCBI::ErrCode( (err_code), (err_subcode) ) \ << message << NCBI_NS_NCBI::Endm ) This macro should be used only when you need to make non-constant error subcode. In all other cases it's strongly recomended to move in all projects (except tests) to macro LOG_POST_X to make possible more flexible error statistics and logging.
Definition at line 216 of file ncbidiag.hpp. |
|
|
Log posting only given number of times during program execution.
Definition at line 561 of file ncbidiag.hpp. |
|
|
Log posting only once during program execution.
Definition at line 569 of file ncbidiag.hpp. |
|
|
|
Log posting only given number of times during program execution with default error code and given error subcode.
Definition at line 579 of file ncbidiag.hpp. |
|
|
Log posting only once during program execution with default error code and given error subcode.
Definition at line 593 of file ncbidiag.hpp. |
|
|
Value: ( (NCBI_CHECK_ERR_SUBCODE_X_NAME(error_name, err_subcode)), \ LOG_POST_EX(NCBI_ERRCODE_X_NAME(error_name), err_subcode, message) ) Macro must be placed in headers instead of LOG_POST_X to not confuse default error codes used in sources where this header is included.
Definition at line 541 of file ncbidiag.hpp. Referenced by CBDB_SplitCursor< BDB_SplitStore, BDB_Vol >::CBDB_SplitCursor(), CICacheCF< CNetICacheClient >::ConfigureTimeStamp(), CPluginManager< TClass >::CreateInstanceFromList(), CCacheCleanerThread::DoJob(), CSimpleJobFactoryEx< TWorkerNodeJob, TWorkerNodeIdleTask >::Init(), CBDB_BlobSplitStore< TBV, TObjDeMux, TL >::~CBDB_BlobSplitStore(), and CBDB_ExtBlobStore< TBV >::~CBDB_ExtBlobStore(). |
|
|
Value: NCBI_REPEAT_POST_N_TIMES( LOG_POST_XX, count, \ (error_name, err_subcode, message) )
Definition at line 608 of file ncbidiag.hpp. |
|
|
Log posting only once during program execution with given error code name and given error subcode.
Definition at line 624 of file ncbidiag.hpp. |
|
|
Issue compile-time error if error subcode given is not valid for current error code.
Definition at line 438 of file ncbidiag.hpp. |
|
|
Value: NCBI_NS_NCBI::CheckErrSubcodeX( \ (int)sizeof(NCBI_NS_NCBI::WRONG_ERROR_SUBCODE_IN_POST_MACRO< \ NCBI_ERRCODE_X_NAME(name), subcode, \ NCBI_MAX_ERR_SUBCODE_X_NAME(name), \ ((unsigned int)subcode > \ (unsigned int)NCBI_MAX_ERR_SUBCODE_X_NAME(name)) \ >) \ ) This design is used for all compilers except early versions of gcc. Though for MIPSpro and ICC it's not enough to make error message clear (see addition below).
Definition at line 424 of file ncbidiag.hpp. |
|
|
Value: inline void NCBI_NAME2(s_ErrCodeCheck_, name) ( \ NCBI_NS_NCBI::WRONG_USAGE_OF_DEFINE_ERR_SUBCODE_MACRO < \ NCBI_ERRCODE_X_NAME(name), \ NCBI_NS_NCBI::err_code_x::eErrCodeX_Max_##name != 0> \ err_subcode) \ {}
Definition at line 384 of file ncbidiag.hpp. |
|
|
|
Define maximum value of subcode for the error code currently in use. Currently used error code is defined by macro NCBI_USE_ERRCODE_X. This macro is a simplified version of NCBI_DEFINE_ERR_SUBCODE_XX and can be handy to use when some error code is used only in one source file and no other error code is used in the same source file. To use this macro you must put 0 as max_err_subcode in NCBI_DEFINE_ERRCODE_X macro. Otherwise compilation error will occur. Macro MUST be used inside ncbi scope. Example: NCBI_DEFINE_ERRCODE_X(Corelib_Util, 110, 0); ... define NCBI_USE_ERRCODE_X Corelib_Util NCBI_DEFINE_ERR_SUBCODE_X(5); ... ERR_POST_X(3, "My error message with variables " << var);
Definition at line 285 of file ncbidiag.hpp. |
|
|
Value: NCBI_CHECK_ERRCODE_USAGE(name) \ namespace err_code_x { \ template <> \ struct NCBI_NAME2(SErrCodeX_Max_, name)<true> { \ enum { \ value = max_err_subcode \ }; \ }; \ } To use this macro you must put 0 as max_err_subcode in NCBI_DEFINE_ERRCODE_X macro. Otherwise compilation error will occur. Macro can be used only once per compilation unit. Macro MUST be used inside ncbi scope. Example: NCBI_DEFINE_ERRCODE_X(Corelib_Util, 110, 0); ... NCBI_DEFINE_ERR_SUBCODE_XX(Corelib_Util, 5); ... define NCBI_USE_ERRCODE_X Corelib_Util ... ERR_POST_X(3, "My error message with variables " << var);
Definition at line 306 of file ncbidiag.hpp. |
|
|
Value: namespace err_code_x { \ enum { \ eErrCodeX_##name = err_code, \ eErrCodeX_Max_##name = max_err_subcode \ }; \ template <bool dummy> \ struct SErrCodeX_Max_##name { \ enum { \ value = max_err_subcode, \ dumm_dumm = int(dummy) \ }; \ }; \ } \ extern void err_code_x__dummy_for_semicolon(void) To use defined error code you need to define symbol NCBI_USE_ERRCODE_X with name as its value. This error code is used only in macros LOG_POST_X and ERR_POST_X. Maximum value of error subcode is being checked during compilation and exists for developers to know what code they can use in next inserted ERR_POST_X call (i.e. when one want to insert new ERR_POST_X call he has to find definition of error code used in the source file, increase value of maximum subcode and put result in ERR_POST_X call). Definition of error code and its maximum subcode can be split into 2 independent macros to avoid recompilation of everything that includes header with error code definition. For more information about it see NCBI_DEFINE_ERR_SUBCODE_X. Macro MUST be used inside ncbi scope. Example: NCBI_DEFINE_ERRCODE_X(Corelib_Util, 110, 5); ... define NCBI_USE_ERRCODE_X Corelib_Util ... ERR_POST_X(3, "My error message with variables " << var);
Definition at line 249 of file ncbidiag.hpp. |
|
|
Returns currently set default error code. Default error code is set by definition of NCBI_USE_ERRCODE_X with name of error code as its value.
Definition at line 328 of file ncbidiag.hpp. Referenced by AbstractLexer::LexerWarning(), ReplaceVisibleChar(), CObjectOStream::ThrowError1(), CObjectIStream::ThrowError1(), CDataValue::Warning(), CDataType::Warning(), and CConn_Streambuf::x_LogIfError(). |
|
|
Returns value of error code by its name defined by NCBI_DEFINE_ERRCODE_X.
Definition at line 321 of file ncbidiag.hpp. Referenced by CStaticArraySearchBase< PKeyValueSelf< KeyType >, KeyCompare >::x_Validate(). |
|
|
Set default module name based on NCBI_MODULE macro.
Definition at line 137 of file ncbidiag.hpp. Referenced by CStaticArraySearchBase< PKeyValueSelf< KeyType >, KeyCompare >::x_Validate(). |
|
|
Returns maximum value of error subcode within current default error code.
Definition at line 339 of file ncbidiag.hpp. |
|
|
Returns maximum value of error subcode within error code with given name.
Definition at line 333 of file ncbidiag.hpp. |
|
|
Value: do { \ static volatile int sx_to_show = (count); \ int to_show = sx_to_show; \ if ( to_show > 0 ) { \ sx_to_show = to_show - 1; \ post_macro params; /* parenthesis are in params */ \ } \ } while ( false ) This macro MUST not be used outside this header. Definition at line 549 of file ncbidiag.hpp. |
|
|
Definition at line 127 of file syslog.hpp. |
|
|
Abort handler function type.
Definition at line 1403 of file ncbidiag.hpp. |
|
|
Diagnostic cleanup function type.
Definition at line 2168 of file ncbidiag.hpp. |
|
|
Diagnostic handler function type.
Definition at line 2165 of file ncbidiag.hpp. |
|
|
Binary OR of "EDiagPostFlag".
Definition at line 744 of file ncbidiag.hpp. |
|
|
Definition at line 56 of file ncbi_userhost.hpp. |
|
|
User-defined request properties.
Definition at line 134 of file request_ctx.hpp. |
|
|
Definition at line 189 of file request_ctx.hpp. |
|
|
Where to write the application's diagnostics to.
Definition at line 1640 of file ncbidiag.hpp. |
|
|
Application execution states shown in the std prefix.
Definition at line 748 of file ncbidiag.hpp. |
|
|
Flags to control collecting messages and flushing them to the new destination when switching diag handlers.
Definition at line 1658 of file ncbidiag.hpp. |
|
|
Type of file for the output. Specialization of "CDiagHandler" for the file-based diagnostics. Splits output into three files: .err (severity higher than the threshold), .trace (severity below the threshold) and .log (application access log). Re-opens the files periodically to allow safe log rotation.
Definition at line 2335 of file ncbidiag.hpp. |
|
|
Diag severity types to put the filter on.
Definition at line 2207 of file ncbidiag.hpp. |
|
|
Which parts of the diagnostic context should be posted. Generic appearance of the posted message is as follows:
"<file>", line <line>: <severity>: (<err_code>.<err_subcode>) [<prefix1>::<prefix2>::<prefixN>] <message> Example:
Definition at line 677 of file ncbidiag.hpp. |
|
|
Severity level for the posted diagnostics.
Definition at line 636 of file ncbidiag.hpp. |
|
|
Severity level change state.
Definition at line 652 of file ncbidiag.hpp. |
|
|
Which setting disables/enables posting of "eDiag_Trace" messages. By default, trace messages are disabled unless:
Definition at line 1426 of file ncbidiag.hpp. |
|
|
Flags for SetDiagUserAndHost().
Definition at line 50 of file ncbi_userhost.hpp. |
|
|
Post nubmer increment flag for GetProcessPostNumber() and GetThreadPostNumber().
Definition at line 1671 of file ncbidiag.hpp. |
|
|
Definition at line 180 of file request_ctx.hpp. |
|
|
Smart abort function. Processes user abort handler and does not popup assert windows if specified (environment variable DIAG_SILENT_ABORT is "Y" or "y"). Definition at line 5399 of file ncbidiag.cpp. References _ASSERT, and s_UserAbortHandler. Referenced by CGlUtils::CheckGlError(), CCacheBlobStream::Close(), CDiagContextThreadData::GetThreadData(), CObject::ThrowNullPointerException(), CObjectException::x_InitErrCode(), and CCacheBlobStream::~CCacheBlobStream(). |
|
|
Additional dummy function for use in NCBI_CHECK_ERR_SUBCODE_X macro.
Definition at line 394 of file ncbidiag.hpp. |
|
||||||||||||
|
Compare two severities.
Definition at line 4176 of file ncbidiag.cpp. References eDiag_Trace. Referenced by CException::CException(), CException::GetStackTrace(), IsVisibleDiagPostLevel(), CDiagCollectGuard::SetCollectSeverity(), CDiagCollectGuard::SetPrintSeverity(), CException::SetSeverity(), and SDiagMessage::x_Write(). |
|
|
|
|
|
Ask diagnostic handler to reopen log files if necessary.
Definition at line 4299 of file ncbidiag.cpp. References CDiagHandler::fCheck, GetDiagHandler(), and handler(). Referenced by CDefaultIdler::Idle(). |
|
|
Disable change the diagnostic post level. Consecutive using SetDiagPostLevel() will not have effect. Definition at line 4206 of file ncbidiag.cpp. References eDiagSC_Disable, and eDiagSC_Enable. Referenced by SetDiagFixedPostLevel(). |
|
|
Definition at line 5611 of file ncbidiag.cpp. References kEmptyCStr. |
|
|
Application state.
Definition at line 85 of file request_ctx.cpp. References eDiagAppState_NotSet, GetDiagContext(), CDiagContext::GetGlobalAppState(), and CRequestContext::m_AppState. Referenced by CDiagContext::GetAppState(), and CRequestStateGuard::~CRequestStateGuard(). |
|
|
Get auto-increment state.
Definition at line 153 of file request_ctx.hpp. References CRequestContext::m_AutoIncOnPost. Referenced by SDiagMessage::SDiagMessage(). |
|
|
Bytes read.
Definition at line 363 of file request_ctx.hpp. References CRequestContext::eProp_BytesRd, CRequestContext::m_BytesRd, and CRequestContext::x_IsSetProp(). Referenced by CDiagContext::x_PrintMessage(). |
|
|
Bytes written.
Definition at line 390 of file request_ctx.hpp. References CRequestContext::eProp_BytesWr, CRequestContext::m_BytesWr, and CRequestContext::x_IsSetProp(). Referenced by CDiagContext::x_PrintMessage(). |
|
|
Client IP/hostname.
Definition at line 248 of file request_ctx.hpp. References CRequestContext::eProp_ClientIP, kEmptyStr, CRequestContext::m_ClientIP, and CRequestContext::x_IsSetProp(). Referenced by SNetCacheAPIImpl::AppendClientIPSessionID(), SDiagMessage::GetClient(), CDiagContext::GetProperty(), s_AppendClientIPAndSessionID(), and SDiagMessage::x_SaveContextData(). |
|
|
Get default auto-increment flag.
Definition at line 186 of file request_ctx.cpp. References CRequestContext::sx_GetDefaultAutoIncRequestIDOnPost(). Referenced by CDiagContextThreadData::CDiagContextThreadData(). |
|
|
|
Get handler for processing error codes.
Definition at line 4949 of file ncbidiag.cpp. References _ASSERT. Referenced by SDiagMessage::x_NewWrite(). |
|
|
Get the currently set diagnostic handler class.
Definition at line 4288 of file ncbidiag.cpp. References _ASSERT. Referenced by CWindowsCmdErrorHandler::CWindowsCmdErrorHandler(), CwxLogDiagHandler::CwxLogDiagHandler(), DiagHandler_Reopen(), CNcbiApplication::FlushDiag(), GetDiagStream(), GetLogFile(), SetDiagNode(), CDiagContext::SetupDiag(), and CNcbiApplication::x_HonorStandardSettings(). |
|
|
Get iteration number/request ID.
Definition at line 802 of file ncbidiag.cpp. References GetDiagContext(), CDiagContext::GetRequestContext(), and CRequestContext::GetRequestID(). Referenced by GetFastCGIIteration(). |
|
|
Get current diagnostic stream (if it was set by SetDiagStream) or NULL.
Definition at line 5360 of file ncbidiag.cpp. References GetDiagHandler(), and CStreamDiagHandler_Base::GetStream(). Referenced by BOOST_AUTO_TEST_CASE(), and CAutoDiagnosticsRedirector::CAutoDiagnosticsRedirector(). |
|
|
Get URL-encoded session ID.
Definition at line 275 of file request_ctx.hpp. References CRequestContext::eProp_SessionID, CEncodedString::GetEncodedString(), kEmptyStr, CRequestContext::m_SessionID, and CRequestContext::x_IsSetProp(). Referenced by SDiagMessage::GetSession(), and SDiagMessage::x_SaveContextData(). |
|
|
Definition at line 1300 of file ncbidiag.hpp. References GetDiagRequestId(). |
|
|
Hit ID.
Definition at line 303 of file request_ctx.hpp. References CRequestContext::eProp_HitID, kEmptyStr, CRequestContext::m_HitID, and CRequestContext::x_IsSetProp(). Referenced by CCgiApplication::x_OnEvent(). |
|
|
Get log file name or diag handler name.
Definition at line 4919 of file ncbidiag.cpp. References GetDiagHandler(), handler(), and kEmptyStr. |
|
|
Get log file name for the given log type. Return empty string for eDiagFile_All or if the log file handler is not installed. Definition at line 4911 of file ncbidiag.cpp. Referenced by GetLogFile(), and CProjBulderApp::Init(). |
|
|
Return the next available application-wide request ID.
Definition at line 60 of file request_ctx.cpp. References CAtomicCounter::Add(). Referenced by CRequestContextSubmitGuard::CRequestContextSubmitGuard(), CNSRequestContextFactory::Get(), CRequestContext::SetRequestID(), and CQueue::Submit(). |
|
|
Get all properties (non-const).
Definition at line 148 of file request_ctx.hpp. References CRequestContext::m_Properties. |
|
|
Get all properties (read only).
Definition at line 146 of file request_ctx.hpp. References CRequestContext::m_Properties. |
|
|
Get property value or empty string.
Definition at line 119 of file request_ctx.cpp. References map_checker< Container >::end(), map_checker< Container >::find(), kEmptyStr, and CRequestContext::m_Properties. |
|
|
Get request ID (or zero if not set).
Definition at line 214 of file request_ctx.hpp. References CRequestContext::eProp_RequestID, CRequestContext::m_RequestID, and CRequestContext::x_IsSetProp(). Referenced by GetDiagRequestId(), CDiagContext::GetNextHitID(), CDiagContextThreadData::GetRequestId(), and CRequestContext::SetSessionID(). |
|
|
Request exit startus.
Definition at line 330 of file request_ctx.hpp. References CRequestContext::eProp_ReqStatus, CRequestContext::m_ReqStatus, and CRequestContext::x_IsSetProp(). Referenced by CDiagContext::x_PrintMessage(). |
|
|
Definition at line 116 of file request_ctx.hpp. References CRequestContext::m_ReqTimer. |
|
|
Request execution timer.
Definition at line 115 of file request_ctx.hpp. References CRequestContext::m_ReqTimer. Referenced by CDiagContext::GetProperty(), CRequestContext::StartRequest(), and CDiagContext::x_PrintMessage(). |
|
|
Session ID.
Definition at line 268 of file request_ctx.hpp. References CRequestContext::eProp_SessionID, CEncodedString::GetOriginalString(), kEmptyStr, CRequestContext::m_SessionID, and CRequestContext::x_IsSetProp(). Referenced by SNetCacheAPIImpl::AppendClientIPSessionID(), and CDiagContext::GetProperty(). |
|
|
Get split log files flag.
Definition at line 4492 of file ncbidiag.cpp. |
|
|
Ignore the die level settings. Return previous setting. WARNING!!! -- not recommended for use unless you are real desperate: By passing TRUE to this function you can make your application never exit/abort regardless of the level set by SetDiagDieLevel(). But be warned this is usually a VERY BAD thing to do! -- because any library code counts on at least "eDiag_Fatal" to exit unconditionally, and thus what happens once "eDiag_Fatal" has been posted, is, in general, totally unpredictable! Therefore, use it on your own risk. Definition at line 4231 of file ncbidiag.cpp. |
|
|
Definition at line 4926 of file ncbidiag.cpp. References CStreamDiagHandler_Base::GetStream(). |
|
|
Definition at line 178 of file request_ctx.hpp. References CRequestContext::m_IsRunning. Referenced by CDiagContext::x_PrintMessage(), and CDiagContext::x_StartRequest(). |
|
|
Definition at line 376 of file request_ctx.hpp. References CRequestContext::eProp_BytesRd, and CRequestContext::x_IsSetProp(). |
|
|
Definition at line 403 of file request_ctx.hpp. References CRequestContext::eProp_BytesWr, and CRequestContext::x_IsSetProp(). |
|
|
Definition at line 254 of file request_ctx.hpp. References CRequestContext::eProp_ClientIP, and CRequestContext::x_IsSetProp(). Referenced by s_AppendClientIPAndSessionID(). |
|
|
Indicates whether an error-code processing handler has been set.
Definition at line 4944 of file ncbidiag.cpp. Referenced by SDiagMessage::x_NewWrite(). |
|
|
Check if diagnostic handler is set.
Definition at line 4283 of file ncbidiag.cpp. References s_DefaultHandler. |
|
||||||||||||
|
Check if a specified flag is set.
Referenced by CDiagContext::ApproveMessage(), CNcbiDiag::ForceImportantFlags(), CStreamDiagHandler::Post(), SDiagMessage::Write(), SDiagMessage::x_NewWrite(), and SDiagMessage::x_OldWrite(). |
|
|
Definition at line 316 of file request_ctx.hpp. References CRequestContext::eProp_HitID, and CRequestContext::x_IsSetProp(). |
|
|
Check if the property has a value (even if it's an empty string).
Definition at line 126 of file request_ctx.cpp. References map_checker< Container >::end(), map_checker< Container >::find(), and CRequestContext::m_Properties. |
|
|
Check if request ID was assigned a value.
Definition at line 234 of file request_ctx.hpp. References CRequestContext::eProp_RequestID, and CRequestContext::x_IsSetProp(). |
|
|
Definition at line 349 of file request_ctx.hpp. References CRequestContext::eProp_ReqStatus, and CRequestContext::x_IsSetProp(). Referenced by CDiagContext::GetProperty(), and CRequestStateGuard::~CRequestStateGuard(). |
|
|
Definition at line 289 of file request_ctx.hpp. References CRequestContext::eProp_SessionID, and CRequestContext::x_IsSetProp(). |
|
|
Check if the specified severity is higher or equal to the currently selected post level and will be printed by LOG_POST/ERR_POST.
Definition at line 4185 of file ncbidiag.cpp. References CompareDiagPostLevel(), and eDiag_Trace. Referenced by CNCBlobStorage::x_IsMonitored(), and CNCMessageHandler::x_IsMonitored(). |
|
||||||||||||
|
Insert message in output stream.
Definition at line 1623 of file ncbidiag.hpp. References SDiagMessage::Write(). |
|
|
|
|
|
Pop a string from the list of message prefixes.
Definition at line 4144 of file ncbidiag.cpp. References GetDiagBuffer(). Referenced by CDiagAutoPrefix::~CDiagAutoPrefix(). |
|
|
Push a string to the list of message prefixes.
Definition at line 4134 of file ncbidiag.cpp. References GetDiagBuffer(). Referenced by CDiagAutoPrefix::CDiagAutoPrefix(), and CCgiApplication::Run(). |
|
|
Reset all properties to the initial state.
Definition at line 98 of file request_ctx.cpp. References eDiagAppState_NotSet, CRequestContext::m_AppState, CRequestContext::m_ReqTimer, CStopWatch::Restart(), CStopWatch::Stop(), CRequestContext::UnsetBytesRd(), CRequestContext::UnsetBytesWr(), CRequestContext::UnsetClientIP(), CRequestContext::UnsetHitID(), CRequestContext::UnsetRequestID(), CRequestContext::UnsetRequestStatus(), and CRequestContext::UnsetSessionID(). Referenced by CRequestContext::StopRequest(). |
|
|
Set/unset abort handler. If "func"==0 use default handler. Definition at line 5393 of file ncbidiag.cpp. |
|
|
Definition at line 92 of file request_ctx.cpp. References CRequestContext::m_AppState. Referenced by CRequestStateGuard::CRequestStateGuard(), CRequestStateGuard::RequestStart(), CRequestStateGuard::RequestStop(), CDiagContext::SetAppState(), and CRequestStateGuard::~CRequestStateGuard(). |
|
|
Auto-increment request ID with every posted message.
Definition at line 151 of file request_ctx.hpp. References CRequestContext::m_AutoIncOnPost. Referenced by main(). |
|
|
Definition at line 369 of file request_ctx.hpp. References CRequestContext::eProp_BytesRd, CRequestContext::m_BytesRd, and CRequestContext::x_SetProp(). Referenced by CRequestContext::StartRequest(). |
|
|
Definition at line 396 of file request_ctx.hpp. References CRequestContext::eProp_BytesWr, CRequestContext::m_BytesWr, and CRequestContext::x_SetProp(). Referenced by CRequestContext::StartRequest(). |
|
|
Definition at line 141 of file request_ctx.cpp. References CRequestContext::eProp_ClientIP, ERR_POST, NStr::IsIPAddress(), kBadIP, CRequestContext::m_ClientIP, and CRequestContext::x_SetProp(). Referenced by CQueueWorkerNodeList::AddJob(), CRequestContextSubmitGuard::CRequestContextSubmitGuard(), CRequestStateGuard::CRequestStateGuard(), s_LogSubmit(), and CDiagContext::SetProperty(). |
|
|
Set default auto-increment flag used for each default request context. Contexts created by users do not check this flag. The flag is not MT-protected. Definition at line 180 of file request_ctx.cpp. References CRequestContext::sx_GetDefaultAutoIncRequestIDOnPost(). Referenced by main(). |
|
|
Set the "die" (abort) level for the program. Abort the application if severity is >= "die_sev". Throw an exception if die_sev is not in the range [eDiagSevMin..eDiag_Fatal].
Definition at line 4216 of file ncbidiag.cpp. References eDiag_Fatal, and NCBI_THROW. |
|
||||||||||||
|
Set handler for processing error codes. By default this handler is unset. NcbiApplication can init itself only if registry key DIAG_MESSAGE_FILE section DEBUG) is specified. The value of this key should be a name of the file with the error codes explanations. Definition at line 4934 of file ncbidiag.cpp. Referenced by CDiagRecycler::~CDiagRecycler(), and CDiagRestorer::~CDiagRestorer(). |
|
||||||||||||
|
Set diagnostic filter. Diagnostic filter acts as a second level filtering mechanism (the primary established by global error post level)
Definition at line 4960 of file ncbidiag.cpp. References eDiagFilter_All, eDiagFilter_Post, eDiagFilter_Trace, s_PostFilter, and s_TraceFilter. Referenced by CGBenchApplication::CGBenchApplication(), and CNcbiTestApplication::CNcbiTestApplication(). |
|
|
Sets and locks the level, combining the previous two calls.
Definition at line 4199 of file ncbidiag.cpp. References DisableDiagPostLevelChange(), and SetDiagPostLevel(). |
|
||||||||||||||||
|
Set the diagnostic handler using the specified diagnostic handler and cleanup functions.
Definition at line 5314 of file ncbidiag.cpp. References SetDiagHandler(). |
|
||||||||||||
|
Set the diagnostic handler using the specified diagnostic handler class.
Definition at line 4254 of file ncbidiag.cpp. Referenced by Cn3DApp::Cn3DApp(), CGBenchSampleCgi::ConfigureDiagDestination(), CGBenchIndexCgi::ConfigureDiagDestination(), CCgiApplication::ConfigureDiagDestination(), CwxLogDiagHandler::CwxLogDiagHandler(), Cn3DNoWin::Exit(), CProjBulderApp::Init(), Cn3DNoWin::Init(), Cn3DApp::OnExit(), SetDiagHandler(), SetDiagStream(), CDiagContext::SetupDiag(), CDiagRecycler::~CDiagRecycler(), CDiagRestorer::~CDiagRestorer(), and CwxLogDiagHandler::~CwxLogDiagHandler(). |
|
|
Set global post flags to "flags". If "flags" have flag eDPF_Default set, it will be replaced by the current global post flags.
Definition at line 4090 of file ncbidiag.cpp. References s_SetDiagPostAllFlags(). Referenced by CProjBulderApp::GenerateSummary(), and CProjBulderApp::Run(). |
|
|
|
|
Specify a string to prefix all subsequent error postings with.
Definition at line 4122 of file ncbidiag.cpp. References GetDiagBuffer(). |
|
|
Set iteration number/request ID.
Definition at line 808 of file ncbidiag.cpp. References GetDiagContext(), CDiagContext::GetRequestContext(), and CRequestContext::SetRequestID(). Referenced by CServer::CreateRequest(), CServerConnectionRequest::Process(), CAcceptRequest::Process(), and SetFastCGIIteration(). |
|
||||||||||||||||||||||||
|
Set diagnostic stream. Error diagnostics are written to output stream "os". This uses the SetDiagHandler() functionality.
Definition at line 5348 of file ncbidiag.cpp. References SetDiagHandler(). Referenced by BOOST_AUTO_TEST_CASE(), CAV_DisplayMultiple(), CSubImageApp::Exit(), CImageTestApp::Exit(), CConvImageApp::Exit(), CBlastSampleApplication::Exit(), CBlastDemoApplication::Exit(), CSampleBasicApplication::Exit(), CReadFilesApp::Exit(), CNCBIwxApplication::Exit(), CWGLDemoApp::Exit(), CToolTipDemoApp::Exit(), CTexDemoApp::Exit(), CSystemTestApp::Exit(), CSplineDemoApp::Exit(), CGl3dDemoApp::Exit(), CFontDemoApp::Exit(), CTestDispatchApp::Exit(), CAppJobTestApplication::Exit(), CGBenchMonitorApp::Exit(), CStreamTestApp::Exit(), CMytestApplication::Exit(), SegMaskerApplication::Exit(), CObjExtractApp::Exit(), CNmer_repeatsApplication::Exit(), CMultiReaderApp::Exit(), CId2FetchApp::Exit(), CId1FetchApp::Exit(), CFormatGuessApp::Exit(), Cn3DNoWin::Exit(), CGuideTreeApplication::Exit(), CConvert2BlastMaskApplication::Exit(), CBlastDbCheckApplication::Exit(), CAgpconvertApplication::Exit(), CAgpValidateApplication::Exit(), CAlignmentRefiner::Exit(), COmssa2pepxmlApplication::Exit(), CMultiApplication::Exit(), CBlastInputDemoApplication::Exit(), CNcbiApplication::FlushDiag(), main(), Cn3DApp::OnExit(), CAutoDiagnosticsRedirector::Redirect(), CAlnVwrApp::Run(), CId2FetchApp::Run(), CId1FetchApp::Run(), CAsn2Asn::Run(), CAlignmentRefiner::Run(), CAlnMrgApp::SetOptions(), CDiagContext::SetupDiag(), and CAutoDiagnosticsRedirector::~CAutoDiagnosticsRedirector(). |
|
||||||||||||
|
Set the diagnostic trace settings.
Definition at line 4240 of file ncbidiag.cpp. References eDT_Default, and eDT_Enable. Referenced by Cn3DApp::Cn3DApp(), CCgiApplication::ConfigureDiagThreshold(), GetAsnDataViaHTTP(), CBDB_MergeTest::Init(), CBDB_SplitTest::Init(), Cn3DNoWin::Init(), main(), ReadASNFromFile(), CWinMaskApplication::Run(), CXcompareAnnotsApplication::Run(), SetDiagPostLevel(), WriteASNToFile(), and CNcbiApplication::x_HonorStandardSettings(). |
|
|
Versions of the above for extra trace flags. ATTENTION: Thus set trace flags will be ADDED to the regular posting flags. Definition at line 4106 of file ncbidiag.cpp. References s_SetDiagPostAllFlags(). |
|
|
Definition at line 4111 of file ncbidiag.cpp. References s_SetDiagPostFlag(). Referenced by CCgiApplication::CCgiApplication(). |
|
|
Set username and hostname properties for the diag context. Do not update existing properties if fDiag_OverrideExisting is not set. Definition at line 42 of file ncbi_userhost.cpp. References CORE_GetUsername(), fDiag_AddUser, fDiag_OverrideExisting, GetDiagContext(), CDiagContext::GetUsername(), and CDiagContext::SetUsername(). |
|
|
Output diagnostics using both old and new style handlers.
Definition at line 5381 of file ncbidiag.cpp. References ERR_POST_X. |
|
|
Definition at line 1307 of file ncbidiag.hpp. References SetDiagRequestId(). |
|
|
Generate unique hit id, assign it to this request, return the hit id value.
Definition at line 67 of file request_ctx.cpp. References GetDiagContext(), and CRequestContext::m_HitID. |
|
|
Definition at line 309 of file request_ctx.hpp. References CRequestContext::eProp_HitID, CRequestContext::m_HitID, and CRequestContext::x_SetProp(). Referenced by CCgiRequest::x_SetPageHitId(). |
|
||||||||||||||||
|
Set log files. Send output to file_name or to file_name.(err|log|trace) depending on the split log file flag and file_type. If a single file type is selected, other types remain the same or are switched to stderr if their files have not been assigned yet. If split log flag is off, any file type except eDiagFile_All will be ignored. If the file_name contains one of the extensions .log, .err or .trace and the file type is eDiagFile_All, the extension will be removed before adding the new one. Return true on success, false if the file could not be open. Definition at line 4833 of file ncbidiag.cpp. References s_IsSpecialLogName(). Referenced by OpenLogFileFromConfig(), and CDiagContext::SetupDiag(). |
|
||||||||||||
|
Add/change property.
Definition at line 113 of file request_ctx.cpp. References CRequestContext::m_Properties. |
|
|
Assign the next available request ID to this request.
Definition at line 227 of file request_ctx.hpp. References CRequestContext::GetNextRequestID(), and CRequestContext::m_RequestID. |
|
|
Set request ID.
Definition at line 220 of file request_ctx.hpp. References CRequestContext::eProp_RequestID, CRequestContext::m_RequestID, and CRequestContext::x_SetProp(). Referenced by CRequestContextSubmitGuard::CRequestContextSubmitGuard(), CRequestStateGuard::CRequestStateGuard(), CNSRequestContextFactory::Get(), CDiagContextThreadData::IncRequestId(), SDiagMessage::SDiagMessage(), SetDiagRequestId(), CDiagContextThreadData::SetRequestId(), and CQueue::Submit(). |
|
|
Definition at line 343 of file request_ctx.hpp. References CRequestContext::SetRequestStatus(). |
|
|
Definition at line 336 of file request_ctx.hpp. References CRequestContext::eProp_ReqStatus, CRequestContext::m_ReqStatus, and CRequestContext::x_SetProp(). Referenced by CQueueWorkerNodeList::RemoveJob(), CCgiApplication::SetHTTPStatus(), CDiagContext::SetProperty(), CRequestContext::SetRequestStatus(), and CRequestStateGuard::~CRequestStateGuard(). |
|
|
Create and set new session ID.
Definition at line 74 of file request_ctx.cpp. References GetDiagContext(), CEncodedString::GetOriginalString(), CRequestContext::GetRequestID(), CDiagContext::GetStringUID(), CRequestContext::m_SessionID, and CDiagContext::UpdateUID(). |
|
|
Definition at line 282 of file request_ctx.hpp. References CRequestContext::eProp_SessionID, CRequestContext::m_SessionID, CEncodedString::SetString(), and CRequestContext::x_SetProp(). Referenced by CQueueWorkerNodeList::AddJob(), CRequestContextSubmitGuard::CRequestContextSubmitGuard(), CRequestStateGuard::CRequestStateGuard(), s_LogSubmit(), CDiagContext::SetProperty(), and CCgiContext::x_InitSession(). |
|
|
Split log files flag. If set, the output is sent to different log files depending on the severity level. Definition at line 4486 of file ncbidiag.cpp. Referenced by main(). |
|
|
Definition at line 156 of file request_ctx.cpp. References CRequestContext::GetRequestTimer(), CRequestContext::m_IsRunning, CStopWatch::Restart(), CRequestContext::SetBytesRd(), CRequestContext::SetBytesWr(), and CRequestContext::UnsetRequestStatus(). |
|
|
Definition at line 166 of file request_ctx.cpp. References CRequestContext::m_IsRunning, and CRequestContext::Reset(). |
|
|
Definition at line 173 of file request_ctx.cpp. Referenced by CRequestContext::GetDefaultAutoIncRequestIDOnPost(), and CRequestContext::SetDefaultAutoIncRequestIDOnPost(). |
|
|
Definition at line 382 of file request_ctx.hpp. References CRequestContext::eProp_BytesRd, CRequestContext::m_BytesRd, and CRequestContext::x_UnsetProp(). Referenced by CRequestContext::Reset(). |
|
|
Definition at line 409 of file request_ctx.hpp. References CRequestContext::eProp_BytesWr, CRequestContext::m_BytesWr, and CRequestContext::x_UnsetProp(). Referenced by CRequestContext::Reset(). |
|
|
Definition at line 260 of file request_ctx.hpp. References CRequestContext::eProp_ClientIP, CRequestContext::m_ClientIP, and CRequestContext::x_UnsetProp(). Referenced by CRequestContext::Reset(), and CRequestStateGuard::~CRequestStateGuard(). |
|
|
Unset the specified flag (globally).
Definition at line 4100 of file ncbidiag.cpp. References s_UnsetDiagPostFlag(). |
|
|
Definition at line 4116 of file ncbidiag.cpp. References s_UnsetDiagPostFlag(). Referenced by Cn3DApp::Cn3DApp(), Cn3DNoWin::Init(), and main(). |
|
|
Definition at line 322 of file request_ctx.hpp. References CRequestContext::eProp_HitID, CRequestContext::m_HitID, and CRequestContext::x_UnsetProp(). Referenced by CRequestContext::Reset(). |
|
|
Remove property from the map.
Definition at line 132 of file request_ctx.cpp. References map_checker< Container >::erase(), and CRequestContext::m_Properties. |
|
|
Reset request ID.
Definition at line 240 of file request_ctx.hpp. References CRequestContext::eProp_RequestID, CRequestContext::m_RequestID, and CRequestContext::x_UnsetProp(). Referenced by CRequestContext::Reset(). |
|
|
Definition at line 355 of file request_ctx.hpp. References CRequestContext::eProp_ReqStatus, CRequestContext::m_ReqStatus, and CRequestContext::x_UnsetProp(). Referenced by CRequestContext::Reset(), CDiagContext::SetProperty(), and CRequestContext::StartRequest(). |
|
|
Definition at line 295 of file request_ctx.hpp. References CRequestContext::eProp_SessionID, kEmptyStr, CRequestContext::m_SessionID, CEncodedString::SetString(), and CRequestContext::x_UnsetProp(). Referenced by CRequestContext::Reset(), and CRequestStateGuard::~CRequestStateGuard(). |
|
|
Definition at line 417 of file request_ctx.hpp. References CRequestContext::m_PropSet. Referenced by CRequestContext::GetBytesRd(), CRequestContext::GetBytesWr(), CRequestContext::GetClientIP(), CRequestContext::GetEncodedSessionID(), CRequestContext::GetHitID(), CRequestContext::GetRequestID(), CRequestContext::GetRequestStatus(), CRequestContext::GetSessionID(), CRequestContext::IsSetBytesRd(), CRequestContext::IsSetBytesWr(), CRequestContext::IsSetClientIP(), CRequestContext::IsSetHitID(), CRequestContext::IsSetRequestID(), CRequestContext::IsSetRequestStatus(), and CRequestContext::IsSetSessionID(). |
|
|
Definition at line 424 of file request_ctx.hpp. References CRequestContext::m_PropSet. Referenced by CRequestContext::SetBytesRd(), CRequestContext::SetBytesWr(), CRequestContext::SetClientIP(), CRequestContext::SetHitID(), CRequestContext::SetRequestID(), CRequestContext::SetRequestStatus(), and CRequestContext::SetSessionID(). |
|
|
Definition at line 430 of file request_ctx.hpp. References CRequestContext::m_PropSet. Referenced by CRequestContext::UnsetBytesRd(), CRequestContext::UnsetBytesWr(), CRequestContext::UnsetClientIP(), CRequestContext::UnsetHitID(), CRequestContext::UnsetRequestID(), CRequestContext::UnsetRequestStatus(), and CRequestContext::UnsetSessionID(). |
|
|
Definition at line 55 of file request_ctx.cpp. |
|
|
Definition at line 198 of file request_ctx.hpp. Referenced by CRequestContext::GetAppState(), CRequestContext::Reset(), and CRequestContext::SetAppState(). |
|
|
Definition at line 209 of file request_ctx.hpp. Referenced by CRequestContext::GetAutoIncRequestIDOnPost(), and CRequestContext::SetAutoIncRequestIDOnPost(). |
|
|
Definition at line 204 of file request_ctx.hpp. Referenced by CRequestContext::GetBytesRd(), CRequestContext::SetBytesRd(), and CRequestContext::UnsetBytesRd(). |
|
|
Definition at line 205 of file request_ctx.hpp. Referenced by CRequestContext::GetBytesWr(), CRequestContext::SetBytesWr(), and CRequestContext::UnsetBytesWr(). |
|
|
Definition at line 199 of file request_ctx.hpp. Referenced by CRequestContext::GetClientIP(), CRequestContext::SetClientIP(), and CRequestContext::UnsetClientIP(). |
|
|
Definition at line 201 of file request_ctx.hpp. Referenced by CRequestContext::GetHitID(), CRequestContext::SetHitID(), and CRequestContext::UnsetHitID(). |
|
|
Definition at line 208 of file request_ctx.hpp. Referenced by CRequestContext::IsRunning(), CRequestContext::StartRequest(), and CRequestContext::StopRequest(). |
|
|
Definition at line 206 of file request_ctx.hpp. Referenced by CRequestContext::GetProperties(), CRequestContext::GetProperty(), CRequestContext::IsSetProperty(), CRequestContext::SetProperty(), and CRequestContext::UnsetProperty(). |
|
|
Definition at line 207 of file request_ctx.hpp. Referenced by CRequestContext::x_IsSetProp(), CRequestContext::x_SetProp(), and CRequestContext::x_UnsetProp(). |
|
|
Definition at line 202 of file request_ctx.hpp. Referenced by CRequestContext::GetRequestStatus(), CRequestContext::SetRequestStatus(), and CRequestContext::UnsetRequestStatus(). |
|
|
Definition at line 203 of file request_ctx.hpp. Referenced by CRequestContext::GetRequestTimer(), and CRequestContext::Reset(). |
|
|
Definition at line 197 of file request_ctx.hpp. Referenced by CRequestContext::GetRequestID(), CRequestContext::SetRequestID(), and CRequestContext::UnsetRequestID(). |
|
|
Definition at line 200 of file request_ctx.hpp. Referenced by CRequestContext::GetEncodedSessionID(), CRequestContext::GetSessionID(), CRequestContext::SetSessionID(), and CRequestContext::UnsetSessionID(). |
1.4.6
Modified on Mon Dec 07 16:24:35 2009 by modify_doxy.py rev. 173732