A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/group__Diagnostics.html below:

NCBI C++ ToolKit: Run-Time Diagnostics

class   CJaegerTracerSpan   class   CJaegerTracer   IRequestTracer implementation for Jaeger tracing. More...
  class   CDiagCompileInfo   Incapsulate compile time information such as __FILE__, __LINE__, NCBI_MODULE, current function. More...
  struct   WRONG_ERROR_SUBCODE_IN_POST_MACRO< errorCode, errorSubcode, maxErrorSubcode, isWrong >   Template structure used to point out wrong error subcode in ERR_POST_X, STD_CATCH_X and alike macros. 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, isWrong >   Template structure used to point out incorrect usage of NCBI_DEFINE_ERR_SUBCODE_X macro i.e. 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   SetPostFlags   SetPostFlags –. 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   CStrictId< TKey, TStorage >   Template class for strict ID types. More...
  class   CDiagContext_Extra   Temporary object for holding extra message arguments. More...
  class   CDiagContext   class   CNcbiLogFields   CNcbiLogFields –. More...
  class   CDiagHandler   class   CStreamDiagHandler_Base   CStreamDiagHandler_Base –. More...
  class   CStreamDiagHandler   CStreamDiagHandler –. More...
  class   CFileHandleDiagHandler   CFileHandleDiagHandler –. More...
  class   CFileDiagHandler   CFileDiagHandler –. More...
  class   CAsyncDiagHandler   class   CDiagFactory   CDiagFactory –. More...
  class   CDiagRestorer   CDiagRestorer –. More...
  struct   SDiagErrCodeDescription   SDiagErrCodeDescription –. More...
  class   CDiagErrCodeInfo   CDiagErrCodeInfo –. More...
  class   COpentelemetryTracerSpan   class   COpentelemetryTracer   IRequestTracer implementation for OpenTelemetry tracing. More...
  class   CPerfLogger   CPerfLogger –. More...
  class   CPerfLogGuard   CPerfLogGuard –. More...
  class   CSharedHitId   Helper class to hold hit id and sub-hit counter which can be shared between multiple request contexts. More...
  class   IRequestTracer   class   ITracerSpan   class   CRequestContext   class   CRequestContext_PassThrough   Request context properties passed between tasks. More...
  class   CRequestContextGuard_Base   Take guard of the current CRequestContext, handle app-state, start/stop logging and request status in the dtor. More...
  class   CRequestContextException   class   CRequestStatus   class   CSysLog   struct   SNcbiLog_Param   Structure to describe pairs 'key=value', used to posting parameters. More...
  #define  NCBI_CURRENT_FUNCTION   NCBI_NS_NCBI::g_DiagUnknownFunction()   Get current function name. More...
  #define  NCBI_MAKE_MODULE(module)   NCBI_AS_STRING(module)   Set default module name based on NCBI_MODULE macro. More...
  #define  DIAG_COMPILE_INFO   Make compile time diagnostic information object to use in CNcbiDiag and CException. More...
  #define  ERR_POST(message)   Error posting with file, line number information but without error codes. More...
  #define  SEVERITY_POST(severity, message)   Wrappers for ERR_POST family of macros checking if the desired severity is enabled. More...
  #define  WARNING_POST(message)   SEVERITY_POST(Warning, message)   #define  INFO_POST(message)   SEVERITY_POST(Info, message)   #define  TRACE_POST(message)   SEVERITY_POST(Trace, message)   #define  SEVERITY_POST_X(severity, subcode, message)   #define  WARNING_POST_X(subcode, message)   SEVERITY_POST_X(Warning, subcode, message)   #define  INFO_POST_X(subcode, message)   SEVERITY_POST_X(Info, subcode, message)   #define  TRACE_POST_X(subcode, message)   SEVERITY_POST_X(Trace, subcode, message)   #define  SEVERITY_POST_EX(severity, errcode, subcode, message)   #define  WARNING_POST_EX(errcode, subcode, message)   SEVERITY_POST_EX(Warning, errcode, subcode, message)   #define  INFO_POST_EX(errcode, message)   SEVERITY_POST_EX(Info, errcode, subcode, message)   #define  TRACE_POST_EX(errcode, message)   SEVERITY_POST_EX(Trace, errcode, subcode, message)   #define  LOG_POST(message)   This macro is deprecated and 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. More...
  #define  ERR_FATAL(message)   Posting fatal error and abort. More...
  #define  ERR_POST_EX(err_code, err_subcode, message)   Error posting with error codes. More...
  #define  LOG_POST_EX(err_code, err_subcode, message)   #define  ERR_FATAL_EX(err_code, err_subcode, message)   #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. More...
  #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. More...
  #define  NCBI_DEFINE_ERR_SUBCODE_XX(name, max_err_subcode)   Define maximum value of subcode for particular error code name. More...
  #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. More...
  #define  NCBI_ERRCODE_X   NCBI_ERRCODE_X_NAME(NCBI_USE_ERRCODE_X)   Returns currently set default error code. More...
  #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. More...
  #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. More...
  #define  NCBI_CHECK_ERRCODE_USAGE(name)   Check that NCBI_DEFINE_ERR_SUBCODE_X is used for correctly defined error code. More...
  #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. More...
  #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. More...
  #define  NCBI_ERR_SUBCODE_X_NAME(name, subcode)    (NCBI_CHECK_ERR_SUBCODE_X_NAME(name, subcode), subcode)   Pass subcode as argument with check of its validity for given error code. More...
  #define  NCBI_ERR_SUBCODE_X(subcode)    (NCBI_CHECK_ERR_SUBCODE_X(subcode), subcode)   Pass subcode as argument with check of its validity for current error code. More...
  #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. More...
  #define  LOG_POST_X(err_subcode, message)    LOG_POST_XX(NCBI_USE_ERRCODE_X, err_subcode, message)   #define  ERR_FATAL_X(err_subcode, message)    ERR_FATAL_XX(NCBI_USE_ERRCODE_X, err_subcode, message)   #define  ERR_POST_XX(error_name, err_subcode, message)   Error posting with error code having given name and with given error subcode. More...
  #define  LOG_POST_XX(error_name, err_subcode, message)   #define  ERR_FATAL_XX(error_name, err_subcode, message)   #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. More...
  #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. More...
  #define  LOG_POST_N_TIMES(count, message)    NCBI_REPEAT_POST_N_TIMES( LOG_POST, count, (message) )   #define  ERR_POST_ONCE(message)   ERR_POST_N_TIMES(1, message)   Error posting only once during program execution. More...
  #define  LOG_POST_ONCE(message)   LOG_POST_N_TIMES(1, message)   #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. More...
  #define  LOG_POST_X_N_TIMES(count, err_subcode, message)    NCBI_REPEAT_POST_N_TIMES( LOG_POST_X, count, (err_subcode, message) )   #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. More...
  #define  LOG_POST_X_ONCE(err_subcode, message)    LOG_POST_X_N_TIMES(1, err_subcode, message)   #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. More...
  #define  LOG_POST_XX_N_TIMES(count, error_name, err_subcode, message)   #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. More...
  #define  LOG_POST_XX_ONCE(error_name, err_subcode, message)    LOG_POST_XX_N_TIMES(1, error_name, err_subcode, message)   #define  DIAG_POST_LEVEL   "DIAG_POST_LEVEL"   Diagnostic post severity level. More...
  #define  DIAG_TRACE   "DIAG_TRACE"   Diagnostic trace setting. More...
  #define  DIAG_MESSAGE_FILE   "MessageFile"   Diagnostic message file. More...
  #define  PERF_POST(perf_logger, status, resource, args)   Convenience macro that also saves cycles when the performance logging is globally turned off. More...
  #define  PERF_POST_DB(perf_logger, status, resource, server, args)   Adaptation for logging database performance. More...
  #define  __STDC_FORMAT_MACROS   #define  NCBILOG_INT8_FORMAT_SPEC   "I64"   #define  NCBILOG_UINT8_FORMAT_SPEC   "I64u"   enum   EDiagUserAndHost { fDiag_AddUser = 1 << 0 , fDiag_AddHost = 1 << 1 , fDiag_OverrideExisting = 1 << 2 }   Flags for SetDiagUserAndHost() More...
  enum   { WRONG_ERROR_SUBCODE_IN_POST_MACRO< errorCode, errorSubcode, maxErrorSubcode, false >::valid = 1 }   enum   { WRONG_USAGE_OF_DEFINE_ERR_SUBCODE_MACRO< errorCode, false >::valid = 1 }   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 = 1 << 0 , eDPF_LongFilename = 1 << 1 , eDPF_Line = 1 << 2 , eDPF_Prefix = 1 << 3 ,
  eDPF_Severity = 1 << 4 , eDPF_ErrorID = 1 << 5 , eDPF_DateTime = 1 << 7 , eDPF_ErrCodeMessage = 1 << 8 ,
  eDPF_ErrCodeExplanation = 1 << 9 , eDPF_ErrCodeUseSeverity = 1 << 10 , eDPF_Location = 1 << 11 , eDPF_TID = 1 << 13 ,
  eDPF_PID = 0 , eDPF_SerialNo = 0 , eDPF_SerialNo_Thread = 0 , eDPF_RequestId = 0 ,
  eDPF_Iteration = eDPF_RequestId , eDPF_UID = 0 , eDPF_ErrCode = eDPF_ErrorID , eDPF_ErrSubCode = eDPF_ErrorID ,
  eDPF_All = 0x7FFFF , eDPF_Trace , eDPF_Exception = eDPF_Trace | eDPF_ErrorID , eDPF_Log = 0 ,
  eDPF_ErrCodeMsgInFront = 1 << 19 , eDPF_MergeLines = 1 << 21 , eDPF_PreMergeLines = eDPF_MergeLines , eDPF_OmitInfoSev = 1 << 22 ,
  eDPF_OmitSeparator = 1 << 23 , eDPF_AppLog = 1 << 24 , eDPF_IsNote = 1 << 25 , eDPF_IsMessage = eDPF_IsNote ,
  eDPF_AtomicWrite = 1 << 26 , eDPF_IsConsole = 1 << 27 , eDPF_Default = 1 << 28 , eDPF_ImportantFlagsMask ,
  eDPF_UseExactUserFlags = 1 << 29
}   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   CDiagCollectGuard::EAction { CDiagCollectGuard::ePrint , CDiagCollectGuard::eDiscard , CDiagCollectGuard::ePrintCapped }   Action to perform in guard's destructor. More...
  enum   EDiagTrace { eDT_Default = 0 , eDT_Disable , eDT_Enable }   Which setting disables/enables posting of "eDiag_Trace" messages. More...
  enum   SDiagMessage::EEventType {
  SDiagMessage::eEvent_Start , SDiagMessage::eEvent_Stop , SDiagMessage::eEvent_Extra , SDiagMessage::eEvent_RequestStart ,
  SDiagMessage::eEvent_RequestStop , SDiagMessage::eEvent_PerfLog
}   Type of event to report. More...
  enum   SDiagMessage::EDiagWriteFlags { SDiagMessage::fNone = 0x0 , SDiagMessage::fNoEndl = 0x01 , SDiagMessage::fNoPrefix = 0x02 }   Compose a message string in the standard format(see also "flags"): "<file>", line <line>: <severity>: [<prefix>] <message> [EOL] and put it to string "str", or write to an output stream "os". More...
  enum   SDiagMessage::EFormatFlag { SDiagMessage::eFormat_Old , SDiagMessage::eFormat_New , SDiagMessage::eFormat_Auto }   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 number increment flag for GetProcessPostNumber() and GetThreadPostNumber(). More...
  enum   CDiagContext::FOnForkAction { CDiagContext::fOnFork_PrintStart = 1 << 0 , CDiagContext::fOnFork_ResetTimer = 1 << 1 , CDiagContext::fOnFork_AsyncSafe = 1 << 15 }   Actions to perform in UpdateOnFork(). More...
  enum   CDiagContext::EPropertyMode { CDiagContext::eProp_Default , CDiagContext::eProp_Global , CDiagContext::eProp_Thread }   Property visibility flag. More...
  enum   CDiagContext::ELogRate_Type { CDiagContext::eLogRate_App , CDiagContext::eLogRate_Err , CDiagContext::eLogRate_Trace }   Type of logging rate limit. More...
  enum   CDiagContext::EDisabledAppLogEvents { CDiagContext::eDisable_All , CDiagContext::eEnable_App }   Flags for disabling groups of applog events with DIAG_DISABLE_APPLOG_MESSAGES. More...
  enum   CDiagContext::EDefaultHitIDFlags { CDiagContext::eHitID_NoCreate , CDiagContext::eHitID_Create }   enum   EDiagFileType {
  eDiagFile_Err , eDiagFile_Log , eDiagFile_Trace , eDiagFile_Perf ,
  eDiagFile_All
}   CDiagHandler –. More...
  enum   CDiagHandler::EReopenFlags { CDiagHandler::fTruncate = 0x01 , CDiagHandler::fCheck = 0x02 , CDiagHandler::fDefault = 0 }   enum   EDiagFilter { eDiagFilter_Trace , eDiagFilter_Post , eDiagFilter_All }   Diag severity types to put the filter on. More...
  enum   CPerfLogger::EStart { CPerfLogger::eStart , CPerfLogger::eSuspend }   If to start the timing immediately. More...
  enum   ITracerSpan::ESpanKind { ITracerSpan::eKind_NotSet , ITracerSpan::eKind_Internal , ITracerSpan::eKind_Server , ITracerSpan::eKind_Client }   enum   ITracerSpan::ESpanAttribute {
  ITracerSpan::eSessionId , ITracerSpan::eClientAddress , ITracerSpan::eClientPort , ITracerSpan::eServerAddress ,
  ITracerSpan::eServerPort , ITracerSpan::eUrl , ITracerSpan::eRequestMethod , ITracerSpan::eUrlScheme ,
  ITracerSpan::eHttpScheme , ITracerSpan::eStatusCode , ITracerSpan::eStatusString
}   enum   ITracerSpan::EHttpHeaderType { ITracerSpan::eRequest , ITracerSpan::eResponse }   enum   ITracerSpan::ESpanStatus { ITracerSpan::eSuccess , ITracerSpan::eError }   enum   CRequestContext::EContextFlags { CRequestContext::fResetOnStart = 1 , CRequestContext::fDefault = 0 }   Request context flags. More...
  enum   CRequestContext::EHitIDSource { CRequestContext::eHitID_Any = 0 , CRequestContext::eHitID_Request = 0x01 , CRequestContext::eHitID_Default = 0x02 , CRequestContext::eHidID_Existing = eHitID_Default | eHitID_Request }   Hit ID Allowed source of the current hit id. More...
  enum   CRequestContext::ESessionIDFormat { CRequestContext::eSID_Ncbi , CRequestContext::eSID_Standard , CRequestContext::eSID_Other }   Session ID format. More...
  enum   CRequestContext::EOnBadSessionID {
  CRequestContext::eOnBadSID_Allow , CRequestContext::eOnBadSID_AllowAndReport , CRequestContext::eOnBadSID_Ignore , CRequestContext::eOnBadSID_IgnoreAndReport ,
  CRequestContext::eOnBadSID_Throw
}   Session ID error actions. 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 , CRequestContext::eProp_Dtab = 1 << 7
}   enum   CRequestContext::FLoggedHitIDFlag { CRequestContext::fLoggedOnRequest = 1 , CRequestContext::fLoggedOnError = 2 }   enum   CRequestContext_PassThrough::EFormat { CRequestContext_PassThrough::eFormat_UrlEncoded }   Supported serialization/deserialization formats. More...
  enum   CRequestContextGuard_Base::EFlags { CRequestContextGuard_Base::fPrintRequestStart = 1 << 0 }   enum   CRequestContextException::EErrCode { CRequestContextException::eBadSession , CRequestContextException::eBadHit }   Error types that CRequestContext can generate. More...
  enum   CRequestStatus::ECode {
  CRequestStatus::e100_Continue = 100 , CRequestStatus::e101_SwitchingProtocols = 101 , CRequestStatus::e200_Ok = 200 , CRequestStatus::e201_Created = 201 ,
  CRequestStatus::e202_Accepted = 202 , CRequestStatus::e203_NonAuthInformation = 203 , CRequestStatus::e204_NoContent = 204 , CRequestStatus::e205_ResetContent = 205 ,
  CRequestStatus::e206_PartialContent = 206 , CRequestStatus::e299_PartialContentBrokenConnection = 299 , CRequestStatus::e300_MultipleChoices = 300 , CRequestStatus::e301_MovedPermanently = 301 ,
  CRequestStatus::e302_Found = 302 , CRequestStatus::e303_SeeOther = 303 , CRequestStatus::e304_NotModified = 304 , CRequestStatus::e305_UseProxy = 305 ,
  CRequestStatus::e307_TemporaryRedirect = 307 , CRequestStatus::e400_BadRequest = 400 , CRequestStatus::e401_Unauthorized = 401 , CRequestStatus::e402_PaymentRequired = 402 ,
  CRequestStatus::e403_Forbidden = 403 , CRequestStatus::e404_NotFound = 404 , CRequestStatus::e405_MethodNotAllowed = 405 , CRequestStatus::e406_NotAcceptable = 406 ,
  CRequestStatus::e407_ProxyAuthRequired = 407 , CRequestStatus::e408_RequestTimeout = 408 , CRequestStatus::e409_Conflict = 409 , CRequestStatus::e410_Gone = 410 ,
  CRequestStatus::e411_LengthRequired = 411 , CRequestStatus::e412_PreconditionFailed = 412 , CRequestStatus::e413_RequestEntityTooLarge = 413 , CRequestStatus::e414_RequestURITooLong = 414 ,
  CRequestStatus::e415_UnsupportedMediaType = 415 , CRequestStatus::e416_RangeNotSatisfiable = 416 , CRequestStatus::e417_ExpectationFailed = 417 , CRequestStatus::e422_UnprocessableEntity = 422 ,
  CRequestStatus::e429_Too_Many_Requests = 429 , CRequestStatus::e451_Unavailable_For_Legal_Reasons = 451 , CRequestStatus::e499_BrokenConnection = 499 , CRequestStatus::e500_InternalServerError = 500 ,
  CRequestStatus::e501_NotImplemented = 501 , CRequestStatus::e502_BadGateway = 502 , CRequestStatus::e503_ServiceUnavailable = 503 , CRequestStatus::e504_GatewayTimeout = 504 ,
  CRequestStatus::e505_HTTPVerNotSupported = 505
}   enum   CSysLog::EFlags {
  CSysLog::fNoOverride = 0x40000000 , CSysLog::fCopyToStderr = 0x20000000 , CSysLog::fFallBackToConsole = 0x10000000 , CSysLog::fIncludePID = 0x08000000 ,
  CSysLog::fConnectNow = 0x04000000 , CSysLog::fNoChildWait = 0x02000000 , CSysLog::fAllFlags = 0x7e000000
}   enum   CSysLog::EPriority {
  CSysLog::eEmergency , CSysLog::eAlert , CSysLog::eCritical , CSysLog::eError ,
  CSysLog::eWarning , CSysLog::eNotice , CSysLog::eInfo , CSysLog::eDebug
}   enum   CSysLog::EFacility {
  CSysLog::eDefaultFacility , CSysLog::eKernel , CSysLog::eUser , CSysLog::eMail ,
  CSysLog::eDaemon , CSysLog::eAuth , CSysLog::eSysLog , CSysLog::eLPR ,
  CSysLog::eNews , CSysLog::eUUCP , CSysLog::eCron , CSysLog::eAuthPriv ,
  CSysLog::eFTP , CSysLog::eLocal0 , CSysLog::eLocal1 , CSysLog::eLocal2 ,
  CSysLog::eLocal3 , CSysLog::eLocal4 , CSysLog::eLocal5 , CSysLog::eLocal6 ,
  CSysLog::eLocal7
}   enum   ENcbiLog_MTLock_Action { eNcbiLog_MT_Init = 0 , eNcbiLog_MT_Lock = 1 , eNcbiLog_MT_Unlock = 2 , eNcbiLog_MT_Destroy = 3 }   The action passed to user defined MT lock handler. More...
  enum   ENcbiLog_MTLock_Ownership { eNcbiLog_MT_NoOwnership = 0 , eNcbiLog_MT_TakeOwnership = 1 }   Type of ownership for MT lock handle. More...
  enum   ENcbiLog_Destination {
  eNcbiLog_Default = 0 , eNcbiLog_Stdlog = 1 , eNcbiLog_Cwd = 2 , eNcbiLog_File = 3 ,
  eNcbiLog_Stdout = 4 , eNcbiLog_Stderr = 5 , eNcbiLog_Disable = 6
}   Where to write the application's diagnostics to. More...
  enum   ENcbiLog_Severity {
  eNcbiLog_Trace = 0 , eNcbiLog_Info = 1 , eNcbiLog_Warning = 2 , eNcbiLog_Error = 3 ,
  eNcbiLog_Critical = 4 , eNcbiLog_Fatal = 5
}   Severity level for the posted diagnostics. More...
  enum   ENcbiLog_OnForkAction { fNcbiLog_OnFork_UpdateID = 0 , fNcbiLog_OnFork_PrintStart = 1 << 0 , fNcbiLog_OnFork_ResetTimer = 1 << 1 }   Actions to perform in NcbiLog_UpdateOnFork() More...
  enum   ENcbiLog_AppState {
  eNcbiLog_NotSet = 0 , eNcbiLog_AppBegin = 1 , eNcbiLog_AppRun = 2 , eNcbiLog_AppEnd = 3 ,
  eNcbiLog_RequestBegin = 4 , eNcbiLog_Request = 5 , eNcbiLog_RequestEnd = 6
}   Application execution states shown in the std prefix. More...
  void  SetDiagUserAndHost (TDiagUserAndHost flags=fDiag_AddUser|fDiag_AddHost)   Set username and hostname properties for the diag context. More...
    CJaegerTracerSpan::CJaegerTracerSpan (shared_ptr< jaegertracing::Span > span)   jaegertracing::Span &  CJaegerTracerSpan::GetSpan (void)   void  CJaegerTracerSpan::SetName (const string &name) override   void  CJaegerTracerSpan::SetAttribute (ESpanAttribute attr, const string &value) override   void  CJaegerTracerSpan::SetCustomAttribute (const string &attr, const string &value) override   void  CJaegerTracerSpan::SetHttpHeader (EHttpHeaderType header_type, const string &name, const string &value) override   void  CJaegerTracerSpan::SetSpanStatus (ESpanStatus status) override   const stringCJaegerTracerSpan::GetTraceState (void) const override   const stringCJaegerTracerSpan::GetTraceParent (void) const override   void  CJaegerTracerSpan::PostEvent (const SDiagMessage &message) override   void  CJaegerTracerSpan::EndSpan (void) override     CJaegerTracer::CJaegerTracer (void)   Create tracer using default settings: More...
    CJaegerTracer::CJaegerTracer (const string &service_name)   Create tracer using the service name and the environment varibles to populate configuration. More...
    CJaegerTracer::CJaegerTracer (const string &service_name, const jaegertracing::Config &config)   Create tracer using the service name and config. More...
    CJaegerTracer::~CJaegerTracer (void)   void  CJaegerTracer::OnRequestStart (CRequestContext &context) override   void  CJaegerTracer::OnRequestStop (CRequestContext &context) override     CDiagCompileInfo::CDiagCompileInfo (void)   CDiagCompileInfo:: More...
    CDiagCompileInfo::CDiagCompileInfo (const char *file, int line, const char *curr_funct=NULL, const char *module=NULL)     CDiagCompileInfo::CDiagCompileInfo (const string &file, int line, const string &curr_funct, const string &module)     CDiagCompileInfo::~CDiagCompileInfo (void)   const char *  CDiagCompileInfo::GetFile (void) const   const char *  CDiagCompileInfo::GetModule (void) const   int  CDiagCompileInfo::GetLine (void) const   const stringCDiagCompileInfo::GetClass (void) const   const stringCDiagCompileInfo::GetFunction (void) const   void  CDiagCompileInfo::SetFile (const string &file)   void  CDiagCompileInfo::SetModule (const string &module)   void  CDiagCompileInfo::SetLine (int line)   void  CDiagCompileInfo::SetFunction (const string &func)   void  CDiagCompileInfo::SetClass (const string &cls)   void  CDiagCompileInfo::ParseCurrFunctName (void) const   bool  CDiagCompileInfo::x_NeedModule (void) const   const char *  g_DiagUnknownFunction (void)   void  CheckErrSubcodeX (int)   Additional dummy function for use in NCBI_CHECK_ERR_SUBCODE_X macro. More...
    ErrCode::ErrCode (int code, int subcode=0)   Constructor. More...
    Severity::Severity (EDiagSev sev)     SetPostFlags::SetPostFlags (TDiagPostFlags flags)     MDiagModule::MDiagModule (const char *module)     MDiagClass::MDiagClass (const char *nclass)     MDiagFunction::MDiagFunction (const char *function)     CNcbiDiag::CNcbiDiag (EDiagSev sev=eDiag_Error, TDiagPostFlags post_flags=eDPF_Default)   Constructor. More...
    CNcbiDiag::CNcbiDiag (const CDiagCompileInfo &info, EDiagSev sev=eDiag_Error, TDiagPostFlags post_flags=eDPF_Default)   Constructor – includes the file and line number info. More...
    CNcbiDiag::~CNcbiDiag (void)   Destructor. More...
  const CNcbiDiagCNcbiDiag::GetRef (void) const   Some compilers (e.g. More...
  template<class X > const CNcbiDiagCNcbiDiag::Put (const volatile void *, const X &x) const   Generic method to post to diagnostic stream. More...
  const CNcbiDiagCNcbiDiag::Put (const ErrCode *, const ErrCode &err_code) const   Helper method to post error code and subcode to diagnostic stream. More...
  const CNcbiDiagCNcbiDiag::Put (const Severity *, const Severity &severity) const   Helper method to set severity level. More...
  template<class X > const CNcbiDiagCNcbiDiag::Put (const CException *, const X &x) const   Helper method to post an exception to diagnostic stream. More...
  template<class X > const CNcbiDiagCNcbiDiag::Put (const exception *, const X &x) const   const CNcbiDiagCNcbiDiag::Put (const CStackTrace *, const CStackTrace &stacktrace) const   Helper method to post stack trace to diagnostic stream using standard stack trace formatting. More...
  const CNcbiDiagCNcbiDiag::Put (const NCBI_NS_NCBI::SetPostFlags *, const NCBI_NS_NCBI::SetPostFlags &flags) const   Helper method to set specific post flags. More...
  const CNcbiDiagCNcbiDiag::Put (const FManip, const FManip &manip) const   Helper method to handle various diagnostic stream manipulators. More...
  const CNcbiDiagCNcbiDiag::operator<< (FManip manip) const   const CNcbiDiagCNcbiDiag::operator<< (FIosbaseManip manip) const   const CNcbiDiagCNcbiDiag::operator<< (FIosManip manip) const   template<class X > const CNcbiDiagCNcbiDiag::operator<< (const X &x) const   Post the arguments. More...
  static const char *  CNcbiDiag::SeverityName (EDiagSev sev)   Get a common symbolic name for the severity levels. More...
  static bool  CNcbiDiag::StrToSeverityLevel (const char *str_sev, EDiagSev &sev)   Get severity from string. More...
  const CNcbiDiagCNcbiDiag::SetFile (const char *file) const   Set file name to post. More...
  const CNcbiDiagCNcbiDiag::SetModule (const char *module) const   Set module name. More...
  const CNcbiDiagCNcbiDiag::SetClass (const char *nclass) const   Set class name. More...
  const CNcbiDiagCNcbiDiag::SetFunction (const char *function) const   Set function name. More...
  const CNcbiDiagCNcbiDiag::SetLine (size_t line) const   Set line number for post. More...
  const CNcbiDiagCNcbiDiag::SetErrorCode (int code=0, int subcode=0) const   Set error code and subcode numbers. More...
  EDiagSev  CNcbiDiag::GetSeverity (void) const   Get severity of the current message. More...
  const char *  CNcbiDiag::GetFile (void) const   Get file used for the current message. More...
  size_t  CNcbiDiag::GetLine (void) const   Get line number for the current message. More...
  int  CNcbiDiag::GetErrorCode (void) const   Get error code of the current message. More...
  int  CNcbiDiag::GetErrorSubCode (void) const   Get error subcode of the current message. More...
  const char *  CNcbiDiag::GetModule (void) const   Get module name of the current message. More...
  const char *  CNcbiDiag::GetClass (void) const   Get class name of the current message. More...
  const char *  CNcbiDiag::GetFunction (void) const   Get function name of the current message. More...
  bool  CNcbiDiag::CheckFilters (const CException *ex=NULL) const   Check if filters are passed for the current message. More...
  TDiagPostFlags  CNcbiDiag::GetPostFlags (void) const   Get post flags for the current message. More...
  void  CNcbiDiag::SetAllPostFlags (TDiagPostFlags flags) const   Set new post flags for the current message. More...
  TDiagPostFlags  CNcbiDiag::SetPostFlags (TDiagPostFlags flags) const   Set specific post flags for the current message. More...
  TDiagPostFlags  CNcbiDiag::ResetPostFlags (TDiagPostFlags flags) const   Clear specific post flags for the current message. More...
  static NCBI_XNCBI_EXPORT void  CNcbiDiag::DiagFatal (const CDiagCompileInfo &info, const char *message)   Display fatal error message. More...
  static void  CNcbiDiag::DiagTrouble (const CDiagCompileInfo &info, const char *message=NULL)   Display trouble error message. More...
  static NCBI_XNCBI_EXPORT void  CNcbiDiag::DiagAssert (const CDiagCompileInfo &info, const char *expression, const char *message=NULL)   Assert specified expression and report results. More...
  static void  CNcbiDiag::DiagAssertIfSuppressedSystemMessageBox (const CDiagCompileInfo &info, const char *expression, const char *message=NULL)   Same as DiagAssert but only if the system message box is suppressed. More...
  static void  CNcbiDiag::DiagValidate (const CDiagCompileInfo &info, const char *expression, const char *message)   Display validation message. More...
  void  CNcbiDiag::ResetIsMessageFlag (void) const   void  CNcbiDiag::ResetIsNoteFlag (void) const   Reset IsNote flag. More...
  void  CNcbiDiag::ResetIsConsoleFlag (void) const   Reset IsConsole flag. More...
  bool  CNcbiDiag::GetOmitStackTrace (void) const   void  CNcbiDiag::SetOmitStackTrace (bool value)   static TDiagPostFlags  CNcbiDiag::ForceImportantFlags (TDiagPostFlags flags)   Set important flags to their globally set values. More...
  void  CNcbiDiag::x_EndMess (void) const   Private replacement for Endm called from manipulators. More...
  const CNcbiDiagCNcbiDiag::x_Put (const CException &ex) const   Helper func for the exception-related Put() More...
    CNcbiDiag::CNcbiDiag (const CNcbiDiag &)   Private copy constructor to prohibit copy. More...
  CNcbiDiagCNcbiDiag::operator= (const CNcbiDiag &)   Private assignment operator to prohibit assignment. More...
  bool  IsSetDiagPostFlag (EDiagPostFlag flag, TDiagPostFlags flags=eDPF_Default)   Check if a specified flag is set. More...
  TDiagPostFlags  SetDiagPostAllFlags (TDiagPostFlags flags)   Set global post flags to "flags". More...
  void  SetDiagPostFlag (EDiagPostFlag flag)   Set the specified flag (globally). More...
  void  UnsetDiagPostFlag (EDiagPostFlag flag)   Unset the specified flag (globally). More...
  TDiagPostFlags  SetDiagTraceAllFlags (TDiagPostFlags flags)   Versions of the above for extra trace flags. More...
  void  SetDiagTraceFlag (EDiagPostFlag flag)   void  UnsetDiagTraceFlag (EDiagPostFlag flag)     CDiagCollectGuard::CDiagCollectGuard (void)   Set collectable severity and optionally applied print-severity cap to the current post level, Print severity is set to critical. More...
    CDiagCollectGuard::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::CDiagCollectGuard (EDiagSev print_severity, EDiagSev collect_severity, EAction action=eDiscard)   Create diag collect guard with the given severities and action. More...
    CDiagCollectGuard::~CDiagCollectGuard (void)   Destroy the guard, return post level to the one set before the guard initialization. More...
  EDiagSev  CDiagCollectGuard::GetPrintSeverity (void) const   Get current print severity. More...
  void  CDiagCollectGuard::SetPrintSeverity (EDiagSev sev)   Set new print severity. More...
  EDiagSev  CDiagCollectGuard::GetCollectSeverity (void) const   Get current collect severity. More...
  void  CDiagCollectGuard::SetCollectSeverity (EDiagSev sev)   Set new collect severity. More...
  EDiagSev  CDiagCollectGuard::GetSeverityCap (void) const   Get current severity cap for use in ePrintCapped mode. More...
  void  CDiagCollectGuard::SetSeverityCap (EDiagSev sev)   Set new severity cap for use in PrintCapped mode. More...
  EAction  CDiagCollectGuard::GetAction (void) const   Get selected on-destroy action. More...
  void  CDiagCollectGuard::SetAction (EAction action)   Specify on-destroy action. More...
  Uint8  CDiagCollectGuard::GetStartingPoint (void) const   Get the lowest thread-local post number in this guard's scope. More...
  void  CDiagCollectGuard::Release (void)   Release the guard. More...
  void  CDiagCollectGuard::Release (EAction action)   Release the guard. More...
  void  CDiagCollectGuard::x_Init (EDiagSev print_severity, EDiagSev collect_severity, EAction action)   void  SetDiagPostPrefix (const char *prefix)   Specify a string to prefix all subsequent error postings with. More...
  void  PushDiagPostPrefix (const char *prefix)   Push a string to the list of message prefixes. More...
  void  PopDiagPostPrefix (void)   Pop a string from the list of message prefixes. More...
  Uint8  GetDiagRequestId (void)   Get iteration number/request ID. More...
  void  SetDiagRequestId (Uint8 id)   Set iteration number/request ID. More...
  Uint8  GetFastCGIIteration (void)   void  SetFastCGIIteration (Uint8 id)     CDiagAutoPrefix::CDiagAutoPrefix (const string &prefix)   Constructor. More...
    CDiagAutoPrefix::CDiagAutoPrefix (const char *prefix)   Constructor. More...
    CDiagAutoPrefix::~CDiagAutoPrefix (void)   Remove the prefix automagically, when the object gets out of scope. More...
  EDiagSev  SetDiagPostLevel (EDiagSev post_sev=eDiag_Error)   Set the threshold severity for posting the messages. More...
  EDiagSev  GetDiagPostLevel (void)   Get current threshold severity for posting the messages. More...
  int  CompareDiagPostLevel (EDiagSev sev1, EDiagSev sev2)   Compare two severities. More...
  bool  IsVisibleDiagPostLevel (EDiagSev sev)   Check if the specified severity is higher or equal to the currently selected post level and will be printed by ERR_POST. More...
  bool  DisableDiagPostLevelChange (bool disable_change=true)   Disable change the diagnostic post level. More...
  void  SetDiagFixedPostLevel (EDiagSev post_sev)   Sets and locks the level, combining the previous two calls. More...
  EDiagSev  SetDiagDieLevel (EDiagSev die_sev=eDiag_Fatal)   Set the "die" (abort) level for the program. More...
  EDiagSev  GetDiagDieLevel (void)   Get the "die" (abort) level for the program. More...
  bool  IgnoreDiagDieLevel (bool ignore)   Ignore the die level settings. More...
  void  SetAbortHandler (FAbortHandler func=0)   Set/unset abort handler. More...
  NCBI_XNCBI_EXPORT void  Abort (void)   Smart abort function. More...
  void  SetDiagTrace (EDiagTrace how, EDiagTrace dflt=eDT_Default)   Set the diagnostic trace settings. More...
  bool  GetDiagTrace (void)   Check if traces are enabled. More...
  virtual void  INextDiagMessage::operator() (SDiagMessage &msg)=0   virtual  INextDiagMessage::~INextDiagMessage (void)     SDiagMessage::SDiagMessage (EDiagSev severity, const char *buf, size_t len, const char *file=0, size_t line=0, TDiagPostFlags flags=eDPF_Default, const char *prefix=0, int err_code=0, int err_subcode=0, const char *err_text=0, const char *module=0, const char *nclass=0, const char *function=0)   Initialize SDiagMessage fields. More...
    SDiagMessage::SDiagMessage (const SDiagMessage &message)   Copy constructor required to store the messages and flush them when the diagnostics setup is finished. More...
  SDiagMessageSDiagMessage::operator= (const SDiagMessage &message)   Assignment of messages. More...
    SDiagMessage::SDiagMessage (const string &message, bool *result=0)   Parse a string back into SDiagMessage. More...
    SDiagMessage::~SDiagMessage (void)   bool  SDiagMessage::ParseMessage (const string &message)   Parse the whole string into the message. More...
  static void  SDiagMessage::ParseDiagStream (CNcbiIstream &in, INextDiagMessage &func)   Stream parser. More...
  static string  SDiagMessage::GetEventName (EEventType event)   string  SDiagMessage::FormatExtraMessage (void) const   Convert extra arguments to string. More...
  TUID  SDiagMessage::GetUID (void) const   Get UID from current context or parsed from a string. More...
  CTime  SDiagMessage::GetTime (void) const   Get time and date - current or parsed. More...
  void  SDiagMessage::Write (string &str, TDiagWriteFlags flags=fNone) const   Binary OR of "EDiagWriteFlags". More...
  CNcbiOstreamSDiagMessage::Write (CNcbiOstream &os, TDiagWriteFlags fl=fNone) const   Write to stream. More...
  const stringSDiagMessage::GetHost (void) const   Access to strings stored in SDiagMessageData. More...
  string  SDiagMessage::GetClient (void) const   string  SDiagMessage::GetSession (void) const   const stringSDiagMessage::GetAppName (void) const   EDiagAppState  SDiagMessage::GetAppState (void) const   CNcbiOstreamSDiagMessage::x_OldWrite (CNcbiOstream &os, TDiagWriteFlags fl=fNone) const   CNcbiOstreamSDiagMessage::x_NewWrite (CNcbiOstream &os, TDiagWriteFlags fl=fNone) const   string  SDiagMessage::x_GetModule (void) const   static void  SDiagMessage::s_EscapeNewlines (string &buf)   static void  SDiagMessage::s_UnescapeNewlines (string &buf)   bool  SDiagMessage::x_ParseExtraArgs (const string &str, size_t pos)   void  SDiagMessage::x_SetFormat (EFormatFlag fmt) const   bool  SDiagMessage::x_IsSetOldFormat (void) const   void  SDiagMessage::x_InitData (void) const   void  SDiagMessage::x_SaveContextData (void) const   CNcbiOstreamoperator<< (CNcbiOstream &os, const SDiagMessage &mess)   Insert message in output stream. More...
    CDiagContext_Extra::~CDiagContext_Extra (void)   Prints all arguments as "name1=value1&name2=value2...". More...
  CDiagContext_ExtraCDiagContext_Extra::Print (const string &name, const string &value)   The method does not print the argument, but adds it to the string. More...
  CDiagContext_ExtraCDiagContext_Extra::Print (const string &name, const char *value)   Overloaded Print() for all types. More...
  CDiagContext_ExtraCDiagContext_Extra::Print (const string &name, int value)   CDiagContext_ExtraCDiagContext_Extra::Print (const string &name, unsigned int value)   CDiagContext_ExtraCDiagContext_Extra::Print (const string &name, long value)   CDiagContext_ExtraCDiagContext_Extra::Print (const string &name, unsigned long value)   CDiagContext_ExtraCDiagContext_Extra::Print (const string &name, Int8 value)   CDiagContext_ExtraCDiagContext_Extra::Print (const string &name, Uint8 value)   CDiagContext_ExtraCDiagContext_Extra::Print (const string &name, char value)   CDiagContext_ExtraCDiagContext_Extra::Print (const string &name, signed char value)   CDiagContext_ExtraCDiagContext_Extra::Print (const string &name, unsigned char value)   CDiagContext_ExtraCDiagContext_Extra::Print (const string &name, double value)   CDiagContext_ExtraCDiagContext_Extra::Print (const string &name, bool value)   template<class TKey , class TStorage > CDiagContext_ExtraCDiagContext_Extra::Print (const string &name, const CStrictId< TKey, TStorage > &value)   CDiagContext_ExtraCDiagContext_Extra::Print (TExtraArgs &args)   The method does not print the arguments, but adds it to the string. More...
    CDiagContext_Extra::CDiagContext_Extra (const CDiagContext_Extra &args)   Copying the object will prevent printing it on destruction. More...
  CDiagContext_ExtraCDiagContext_Extra::operator= (const CDiagContext_Extra &args)   void  CDiagContext_Extra::Flush (void)   Print the message and reset object. More...
  CDiagContext_ExtraCDiagContext_Extra::SetType (const string &type)   Set extra message type. More...
  CDiagContext_ExtraCDiagContext_Extra::AllowBadSymbolsInArgNames (void)   Allow bad symbols in argument names. More...
  void  CDiagContext_Extra::x_Release (void)   bool  CDiagContext_Extra::x_CanPrint (void)     CDiagContext_Extra::CDiagContext_Extra (SDiagMessage::EEventType event_type)     CDiagContext_Extra::CDiagContext_Extra (int status, double timespan, TExtraArgs &args)   CDiagContext_ExtraCDiagContext_Extra::PrintNcbiRoleAndLocation (void)   CDiagContext_ExtraCDiagContext_Extra::PrintNcbiAppInfoOnStart (void)   CDiagContext_ExtraCDiagContext_Extra::PrintNcbiAppInfoOnRequest (void)     CDiagContext::CDiagContext (void)     CDiagContext::~CDiagContext (void)   static TPID  CDiagContext::GetPID (void)   Get cached PID (read real PID if not cached yet). More...
  static bool  CDiagContext::UpdatePID (void)   Reset PID cache (e.g. after fork). Return true if PID was updated. More...
  static bool  CDiagContext::UpdatePID_AsyncSafe (void)   static void  CDiagContext::UpdateOnFork (TOnForkFlags flags)   Update diagnostics after fork(). More...
  TUID  CDiagContext::GetUID (void) const   Return (create if not created yet) unique diagnostic ID. More...
  string  CDiagContext::GetStringUID (TUID uid=0) const   Return string representation of UID. More...
  TUID  CDiagContext::UpdateUID (TUID uid=0) const   Take the source UID and replace its timestamp part with the current time. More...
  void  CDiagContext::GetStringUID (TUID uid, char *buf, size_t buf_len) const   Fill buffer with string representation of UID. More...
  void  CDiagContext::GetStringUID (TUID uid, char *buf) const   string  CDiagContext::GetNextHitID (void) const   Create global unique request id. More...
  string  CDiagContext::GetGlobalRequestId (void) const   Deprecated version of HID generator. More...
  static CRequestContextCDiagContext::GetRequestContext (void)   Shortcut to CDiagContextThreadData::GetThreadData().GetRequestContext() More...
  static void  CDiagContext::SetRequestContext (CRequestContext *ctx)   Shortcut to CDiagContextThreadData::GetThreadData().SetRequestContext() More...
  void  CDiagContext::SetAutoWrite (bool value)   Set AutoWrite flag. More...
  void  CDiagContext::SetProperty (const string &name, const string &value, EPropertyMode mode=eProp_Default)   Set application context property by name. More...
  string  CDiagContext::GetProperty (const string &name, EPropertyMode mode=eProp_Default) const   Get application context property by name, return empty string if the property is not set. More...
  void  CDiagContext::DeleteProperty (const string &name, EPropertyMode mode=eProp_Default)   Delete a property by name. More...
  void  CDiagContext::PrintProperties (void)   Forced dump of all set properties. More...
  void  CDiagContext::PrintStart (const string &message)   Print start/stop etc. More...
  void  CDiagContext::PrintStop (void)   Print exit message. More...
  void  CDiagContext::PrintExtra (const string &message)   Print extra message in plain text format. More...
  CDiagContext_Extra  CDiagContext::Extra (void) const   Create a temporary CDiagContext_Extra object. More...
  void  CDiagContext::PrintRequestStart (const string &message)   Print request start message (for request-driven applications) More...
  CDiagContext_Extra  CDiagContext::PrintRequestStart (void)   Create a temporary CDiagContext_Extra object. More...
  void  CDiagContext::PrintRequestStop (void)   Print request stop message (for request-driven applications) More...
  EDiagAppState  CDiagContext::GetGlobalAppState (void) const   Always returns global application state. More...
  void  CDiagContext::SetGlobalAppState (EDiagAppState state)   Set global application state. More...
  EDiagAppState  CDiagContext::GetAppState (void) const   Return application state for the current thread if it's set. More...
  void  CDiagContext::SetAppState (EDiagAppState state)   Set application state. More...
  void  CDiagContext::SetAppState (EDiagAppState state, EPropertyMode mode)   The 'mode' flag is deprecated. More...
  static bool  CDiagContext::IsSetOldPostFormat (void)   Check old/new format flag (for compatibility only) More...
  static void  CDiagContext::SetOldPostFormat (bool value)   Set old/new format flag. More...
  static bool  CDiagContext::IsUsingSystemThreadId (void)   Check if system TID is printed instead of CThread::GetSelf() More...
  static void  CDiagContext::UseSystemThreadId (bool value=true)   Switch printing system TID (rather than CThread::GetSelf()) on/off. More...
  const stringCDiagContext::GetUsername (void) const   Get username. More...
  void  CDiagContext::SetUsername (const string &username)   Set username. More...
  const stringCDiagContext::GetHost (void) const   Get host name. More...
  const stringCDiagContext::GetEncodedHost (void) const   URL-encoded version of GetHost() More...
  const stringCDiagContext::GetHostname (void) const   Get cached hostname - do not try to detect host name as GetHost() does. More...
  const stringCDiagContext::GetEncodedHostname (void) const   Get URL-encoded hostname. More...
  void  CDiagContext::SetHostname (const string &hostname)   Set hostname. More...
  const stringCDiagContext::GetHostIP (void) const   Get host IP address. More...
  void  CDiagContext::SetHostIP (const string &ip)   Set host IP address. More...
  const stringCDiagContext::GetAppName (void) const   Get application name. More...
  const stringCDiagContext::GetEncodedAppName (void) const   Get URL-encoded application name. More...
  void  CDiagContext::SetAppName (const string &app_name)   Set application name. More...
  bool  CDiagContext::IsSetExitCode (void) const   Check if exit code has been set. More...
  int  CDiagContext::GetExitCode (void) const   Get exit code. More...
  void  CDiagContext::SetExitCode (int exit_code)   Set exit code. More...
  int  CDiagContext::GetExitSignal (void) const   Get exit signal. More...
  void  CDiagContext::SetExitSignal (int exit_sig)   Set exit signal. More...
  string  CDiagContext::GetDefaultSessionID (void) const   Get default session id. More...
  void  CDiagContext::SetDefaultSessionID (const string &session_id)   Set new default session id. More...
  string  CDiagContext::GetSessionID (void) const   Get the effective session id: the per-request session id if set, or the default session id. More...
  string  CDiagContext::GetEncodedSessionID (void) const   Get url-encoded session id. More...
  static string  CDiagContext::GetDefaultClientIP (void)   Get default client ip. More...
  static void  CDiagContext::SetDefaultClientIP (const string &client_ip)   Set new default client ip. More...
  string  CDiagContext::GetDefaultHitID (void) const   Get global default hit id. More...
  void  CDiagContext::SetDefaultHitID (const string &hit_id)   Set new global default hit id. More...
  static const stringCDiagContext::GetHostRole (void)   Get host role (DEV/QA/TRY/PROD) from /etc/ncbi/role. More...
  static const stringCDiagContext::GetHostLocation (void)   Get host location (be-md/st-va) from /etc/ncbi/location. More...
  void  CDiagContext::WriteStdPrefix (CNcbiOstream &ostr, const SDiagMessage &msg) const   Write standard prefix to the stream. More...
  void  CDiagContext::InitMessages (size_t max_size=100)   Start collecting all messages (the collected messages can be flushed to a new destination later). More...
  void  CDiagContext::PushMessage (const SDiagMessage &message)   Save new message. More...
  void  CDiagContext::FlushMessages (CDiagHandler &handler)   Flush the collected messages to the current diag handler. More...
  void  CDiagContext::DiscardMessages (void)   Discard the collected messages without printing them. More...
  bool  CDiagContext::IsCollectingMessages (void) const   Check if message collecting is on. More...
  static bool  CDiagContext::GetLogTruncate (void)   Get log file truncation flag. More...
  static void  CDiagContext::SetLogTruncate (bool value)   Set log file truncation flag. More...
  static void  CDiagContext::SetUseRootLog (void)   @depracated The flag is always set now, the funcion still calls SetupDiag() for compatibility, but has no other effects. More...
  static bool  CDiagContext::IsUsingRootLog (void)   Check if the current diagnostics destination is /log/*. More...
  static void  CDiagContext::SetupDiag (EAppDiagStream ds=eDS_Default, CNcbiRegistry *config=NULL, EDiagCollectMessages collect=eDCM_NoChange, const char *cmd_logfile=NULL)   Application-wide diagnostics setup. More...
  static TCount  CDiagContext::GetProcessPostNumber (EPostNumberIncrement inc)   Return process post number (incrementing depends on the flag). More...
  static TCount  CDiagContext::GetThreadPostNumber (EPostNumberIncrement inc)   Return thread post number (incrementing depends on the flag). More...
  static TTID  CDiagContext::GetTID (void)   unsigned int  CDiagContext::GetLogRate_Limit (ELogRate_Type type) const   Logging rate control - max number of messages per period. More...
  void  CDiagContext::SetLogRate_Limit (ELogRate_Type type, unsigned int limit)   unsigned int  CDiagContext::GetLogRate_Period (ELogRate_Type type) const   Logging rate control - the messages control period, seconds. More...
  void  CDiagContext::SetLogRate_Period (ELogRate_Type type, unsigned int period)   static void  CDiagContext::x_FinalizeSetupDiag (void)   Internal function, should be used only by CNcbiApplication. More...
  static bool  CDiagContext::IsApplogSeverityLocked (void)   When using applog, the diag post level is locked to Warning. More...
  static void  CDiagContext::SetApplogSeverityLocked (bool lock)   static bool  CDiagContext::IsMainThreadDataInitialized (void)   static bool  CDiagContext::GetDisabledAppLog (void)   Get flag disabling applog events (set by DIAG_DISABLE_APPLOG_MESSAGES variable). More...
  static EDisabledAppLogEvents  CDiagContext::GetDisabledAppLogEvents (void)   Get disabled applog events (set by DIAG_DISABLE_APPLOG_MESSAGE_TYPES variable). More...
    CDiagContext::CDiagContext (const CDiagContext &)   CDiagContextCDiagContext::operator= (const CDiagContext &)   void  CDiagContext::x_CreateUID (void) const   void  CDiagContext::x_CreateUID_AsyncSafe (void) const   void  CDiagContext::x_PrintMessage (SDiagMessage::EEventType event, const string &message)   static void  CDiagContext::x_StartRequest (void)   static void  CDiagContext::x_LogEnvironment (void)   void  CDiagContext::ResetLogRates (void)   bool  CDiagContext::ApproveMessage (SDiagMessage &msg, bool *show_warning)   static void  CDiagContext::sx_ThreadDataTlsCleanup (CDiagContextThreadData *value, void *cleanup_data)   bool  CDiagContext::x_DiagAtApplicationLevel (void) const   bool  CDiagContext::x_IsSetDefaultHitID (void) const   CSharedHitId  CDiagContext::x_GetDefaultHitID (EDefaultHitIDFlags flag) const   string  CDiagContext::x_GetNextHitID (bool is_default) const   void  CDiagContext::x_LogHitID (void) const   void  CDiagContext::x_LogHitID_WithLock (void) const   CDiagContextGetDiagContext (void)   Get diag context instance. More...
    CNcbiLogFields::CNcbiLogFields (const string &source)   Load fields to be logged from NCBI_LOG_FIELDS environment variable. More...
    CNcbiLogFields::~CNcbiLogFields (void)   template<class TEntries > void  CNcbiLogFields::LogFields (const TEntries &entries) const   Log (as an extra) all names/values matching fields in NCBI_LOG_FIELDS. More...
  void  CNcbiLogFields::x_Match (const string &name, const string &value, CDiagContext_Extra &extra) const   virtual  CDiagHandler::~CDiagHandler (void)   Destructor. More...
  virtual void  CDiagHandler::Post (const SDiagMessage &mess)=0   Post message to handler. More...
  virtual void  CDiagHandler::PostToConsole (const SDiagMessage &mess)   Post message to console regardless of its severity. More...
  virtual bool  CDiagHandler::AllowAsyncWrite (const SDiagMessage &msg) const   Check if the handler supports async writes. More...
  virtual string  CDiagHandler::ComposeMessage (const SDiagMessage &msg, EDiagFileType *file_type) const   Compose message without writing it. More...
  virtual void  CDiagHandler::WriteMessage (const char *buf, size_t len, EDiagFileType file_type)   Write string to the log. More...
  virtual string  CDiagHandler::GetLogName (void)   Get current diag posts destination. More...
  virtual void  CDiagHandler::Reopen (TReopenFlags)   Reopen file to enable log rotation. More...
  void  SetDiagHandler (CDiagHandler *handler, bool can_delete=true)   Set the diagnostic handler using the specified diagnostic handler class. More...
  CDiagHandlerGetDiagHandler (bool take_ownership=false, bool *current_ownership=0)   Get the currently set diagnostic handler class. More...
  void  SetDiagHandler (FDiagHandler func, void *data, FDiagCleanup cleanup)   Set the diagnostic handler using the specified diagnostic handler and cleanup functions. More...
  bool  IsSetDiagHandler (void)   Check if diagnostic handler is set. More...
  void  DiagHandler_Reopen (void)   Ask diagnostic handler to reopen log files if necessary. More...
  void  SetDiagFilter (EDiagFilter what, const char *filter_str)   Set diagnostic filter. More...
  string  GetDiagFilter (EDiagFilter what)   Get current diagnostic filter. More...
  void  AppendDiagFilter (EDiagFilter what, const char *filter_str)   Append diagnostic filter. More...
    CStreamDiagHandler_Base::CStreamDiagHandler_Base (void)   virtual string  CStreamDiagHandler_Base::GetLogName (void)   Get current diag posts destination. More...
  virtual CNcbiOstreamCStreamDiagHandler_Base::GetStream (void)   void  CStreamDiagHandler_Base::SetLogName (const string &log_name)     CStreamDiagHandler::CStreamDiagHandler (CNcbiOstream *os, bool quick_flush=true, const string &stream_name="")   Constructor. More...
  virtual void  CStreamDiagHandler::Post (const SDiagMessage &mess)   Post message to the handler. More...
  virtual CNcbiOstreamCStreamDiagHandler::GetStream (void)     CFileHandleDiagHandler::CFileHandleDiagHandler (const string &fname, EDiagFileType file_type=eDiagFile_All)   Constructor. More...
    CFileHandleDiagHandler::~CFileHandleDiagHandler (void)   Close file handle. More...
  virtual void  CFileHandleDiagHandler::Post (const SDiagMessage &mess)   Post message to the handler. More...
  virtual bool  CFileHandleDiagHandler::AllowAsyncWrite (const SDiagMessage &msg) const   Check if the handler supports async writes. More...
  virtual string  CFileHandleDiagHandler::ComposeMessage (const SDiagMessage &msg, EDiagFileType *file_type) const   Compose message without writing it. More...
  virtual void  CFileHandleDiagHandler::WriteMessage (const char *buf, size_t len, EDiagFileType file_type)   Write string to the log. More...
  bool  CFileHandleDiagHandler::Valid (void)   virtual void  CFileHandleDiagHandler::Reopen (TReopenFlags flags)   Reopen file to enable log rotation. More...
  virtual void  CFileHandleDiagHandler::SetLogName (const string &log_name)     CFileDiagHandler::CFileDiagHandler (void)   Constructor. More...
    CFileDiagHandler::~CFileDiagHandler (void)   virtual void  CFileDiagHandler::Post (const SDiagMessage &mess)   Post message to the handler. More...
  virtual bool  CFileDiagHandler::AllowAsyncWrite (const SDiagMessage &msg) const   Check if the handler supports async writes. More...
  virtual string  CFileDiagHandler::ComposeMessage (const SDiagMessage &msg, EDiagFileType *file_type) const   Compose message without writing it. More...
  virtual void  CFileDiagHandler::WriteMessage (const char *buf, size_t len, EDiagFileType file_type)   Write string to the log. More...
  bool  CFileDiagHandler::SetLogFile (const string &file_name, EDiagFileType file_type, bool quick_flush)   Set new log file. More...
  string  CFileDiagHandler::GetLogFile (EDiagFileType file_type) const   Get current log file name. More...
  CNcbiOstreamCFileDiagHandler::GetLogStream (EDiagFileType file_type)   Get current log stream. More...
  virtual void  CFileDiagHandler::Reopen (TReopenFlags flags)   Reopen file to enable log rotation. More...
  void  CFileDiagHandler::SetSubHandler (CStreamDiagHandler_Base *handler, EDiagFileType file_type, bool own)   void  CFileDiagHandler::SetOwnership (CStreamDiagHandler_Base *handler, bool own)   Change ownership for the given handler if it's currently installed. More...
  virtual void  CFileDiagHandler::SetLogName (const string &log_name)   EDiagFileType  CFileDiagHandler::x_GetDiagFileType (const SDiagMessage &msg) const   CStreamDiagHandler_BaseCFileDiagHandler::x_GetHandler (EDiagFileType file_type) const   void  CFileDiagHandler::x_ResetHandler (CStreamDiagHandler_Base **ptr, bool *owned)   void  CFileDiagHandler::x_SetHandler (CStreamDiagHandler_Base **member, bool *own_member, CStreamDiagHandler_Base *handler, bool own)     CAsyncDiagHandler::CAsyncDiagHandler (void)   virtual  CAsyncDiagHandler::~CAsyncDiagHandler (void)   void  CAsyncDiagHandler::InstallToDiag (void)   Install this DiagHandler into diagnostics. More...
  void  CAsyncDiagHandler::RemoveFromDiag (void)   Remove this DiagHandler from diagnostics. More...
  void  CAsyncDiagHandler::SetCustomThreadSuffix (const string &suffix)   Set custom suffix to use on all threads in the server's pool. More...
  virtual void  CAsyncDiagHandler::Post (const SDiagMessage &mess)   Implementation of CDiagHandler. More...
  virtual string  CAsyncDiagHandler::GetLogName (void)   Get current diag posts destination. More...
  virtual void  CAsyncDiagHandler::Reopen (TReopenFlags flags)   Reopen file to enable log rotation. More...
  void  SetDoubleDiagHandler (void)   Output diagnostics using both old and new style handlers. More...
  void  SetDiagStream (CNcbiOstream *os, bool quick_flush=true, FDiagCleanup cleanup=0, void *cleanup_data=0, const string &stream_name="")   Set diagnostic stream. More...
  bool  IsDiagStream (const CNcbiOstream *os)   CNcbiOstreamGetDiagStream (void)   Get current diagnostic stream (if it was set by SetDiagStream) or NULL. More...
  void  SetSplitLogFile (bool value=true)   Split log files flag. More...
  bool  GetSplitLogFile (void)   Get split log files flag. More...
  bool  SetLogFile (const string &file_name, EDiagFileType file_type=eDiagFile_All, bool quick_flush=true)   Set log files. More...
  string  GetLogFile (EDiagFileType file_type)   Get log file name for the given log type. More...
  string  GetLogFile (void)   Get log file name or diag handler name. More...
  void  g_Diag_Use_RWLock (bool enable=true)   Use RW-lock for synchronization rather than mutex. More...
  virtual  CDiagFactory::~CDiagFactory ()   virtual CDiagHandlerCDiagFactory::New (const string &s)=0   Factory method interface. More...
    CDiagRestorer::CDiagRestorer (void)   Captures current settings. More...
    CDiagRestorer::~CDiagRestorer (void)   Restores captured settings. More...
  void *  CDiagRestorer::operator new (size_t)   Private new operator. More...
  void *  CDiagRestorer::operator new[] (size_t)   Private new[] operator. More...
  void  CDiagRestorer::operator delete (void *)   Private delete operator. More...
  void  CDiagRestorer::operator delete[] (void *)   Private delete[] operator. More...
    SDiagErrCodeDescription::SDiagErrCodeDescription (void)   Constructor. More...
    SDiagErrCodeDescription::SDiagErrCodeDescription (const string &message, const string &explanation, int severity=-1)   Destructor. More...
    CDiagErrCodeInfo::CDiagErrCodeInfo (void)   Constructor. More...
    CDiagErrCodeInfo::CDiagErrCodeInfo (const string &file_name)   Constructor – can throw runtime_error. More...
    CDiagErrCodeInfo::CDiagErrCodeInfo (CNcbiIstream &is)   Constructor – can throw runtime_error. More...
    CDiagErrCodeInfo::~CDiagErrCodeInfo (void)   Destructor. More...
  bool  CDiagErrCodeInfo::Read (const string &file_name)   Read error description from specified file. More...
  bool  CDiagErrCodeInfo::Read (CNcbiIstream &is)   Read error description from specified stream. More...
  void  CDiagErrCodeInfo::Clear (void)   Delete all stored error descriptions from memory. More...
  bool  CDiagErrCodeInfo::GetDescription (const ErrCode &err_code, SDiagErrCodeDescription *description) const   Get description for specified error code. More...
  void  CDiagErrCodeInfo::SetDescription (const ErrCode &err_code, const SDiagErrCodeDescription &description)   Set error description for specified error code. More...
  bool  CDiagErrCodeInfo::HaveDescription (const ErrCode &err_code) const   Check if error description exists. More...
  void  SetDiagErrCodeInfo (CDiagErrCodeInfo *info, bool can_delete=true)   Set handler for processing error codes. More...
  bool  IsSetDiagErrCodeInfo ()   Indicates whether an error-code processing handler has been set. More...
  CDiagErrCodeInfoGetDiagErrCodeInfo (bool take_ownership=false)   Get handler for processing error codes. More...
    COpentelemetryTracerSpan::COpentelemetryTracerSpan (TSpan &span)     COpentelemetryTracerSpan::~COpentelemetryTracerSpan (void)   TSpanCOpentelemetryTracerSpan::GetSpan (void)   void  COpentelemetryTracerSpan::SetName (const string &name) override   void  COpentelemetryTracerSpan::SetAttribute (ESpanAttribute attr, const string &value) override   void  COpentelemetryTracerSpan::SetCustomAttribute (const string &attr, const string &value) override   void  COpentelemetryTracerSpan::SetHttpHeader (EHttpHeaderType header_type, const string &name, const string &value) override   void  COpentelemetryTracerSpan::SetSpanStatus (ESpanStatus status) override   const stringCOpentelemetryTracerSpan::GetTraceState (void) const override   const stringCOpentelemetryTracerSpan::GetTraceParent (void) const override   void  COpentelemetryTracerSpan::PostEvent (const SDiagMessage &message) override   void  COpentelemetryTracerSpan::EndSpan (void) override     COpentelemetryTracer::COpentelemetryTracer (ostream &ostr)   NOTE: The tracers are global; creating a new tracer replaces any previously installed one. More...
    COpentelemetryTracer::COpentelemetryTracer (void)   Export using exporter settings from the environment/INI file. More...
    COpentelemetryTracer::COpentelemetryTracer (const string &endpoint)   Export to OTLP/HTTP collector using the selected endpoint. More...
    COpentelemetryTracer::~COpentelemetryTracer (void)   void  COpentelemetryTracer::OnRequestStart (CRequestContext &context) override   void  COpentelemetryTracer::OnRequestStop (CRequestContext &context) override   static void  COpentelemetryTracer::CleanupTracer (void)   Uninstall current tracer, if any. More...
  void  COpentelemetryTracer::SetDefaultSpanKind (opentelemetry::trace::SpanKind span_kind)   Set the span kind for all new spans (default is 'internal'). More...
  void  COpentelemetryTracer::x_Init (void)   void  COpentelemetryTracer::x_InitOtlp (const string &endpoint)   void  COpentelemetryTracer::x_InitStream (ostream &ostr)     CPerfLogger::CPerfLogger (EStart state=eStart)   Constructor. Starts the timer by default. More...
    CPerfLogger::CPerfLogger (const CTime &start_time, double elapsed_time, EStart state=eStart)   Constructor. More...
    CPerfLogger::CPerfLogger (CStopWatch &stopwatch, EStart state=eStart)   Constructor. More...
  void  CPerfLogger::Start (void)   Activate and start (or, restart after Suspend()) the timer. More...
  void  CPerfLogger::Suspend (void)   Suspend the timer. More...
  CDiagContext_Extra  CPerfLogger::Post (CRequestStatus::ECode status, CTempString resource, CTempString status_msg=CTempString())   Log the timing; stop and deactivate the timer. More...
  CDiagContext_Extra  CPerfLogger::Post (int status, CTempString resource, CTempString status_msg=CTempString())   void  CPerfLogger::Discard (void)   Discard the timing results; stop and deactivate the timer. More...
    CPerfLogger::~CPerfLogger ()   If the timer is still active, then post an error (once). More...
  static bool  CPerfLogger::IsON (void)   Is performance logging on, globally? Controlled by CParam(section="Log", entry="PerfLogging", default=false) More...
  static void  CPerfLogger::SetON (bool enable=true)   Turn performance logging on/off globally. More...
  void  CPerfLogger::Adjust (CTimeSpan timespan)   Adjust the printed elapsed time. More...
  const CTimeCPerfLogger::GetLoggerStartTime (void) const   Get the logger's start time. More...
  double  CPerfLogger::GetElapsedTime (void) const   Get total elapsed time (including any adjustments) in seconds. More...
  bool  CPerfLogger::x_CheckValidity (const CTempString &err_msg) const     CPerfLogGuard::CPerfLogGuard (CTempString resource, CPerfLogger::EStart state=CPerfLogger::eStart)   Constructor. More...
    CPerfLogGuard::CPerfLogGuard (CTempString resource, const CTime &start_time, double elapsed_time, CPerfLogger::EStart state=CPerfLogger::eStart)   Constructor. More...
    CPerfLogGuard::CPerfLogGuard (CTempString resource, CStopWatch &stopwatch, CPerfLogger::EStart state=CPerfLogger::eStart)   Constructor. More...
  void  CPerfLogGuard::Start (void)   Activate and start (or, restart after Suspend()) the timer. More...
  void  CPerfLogGuard::Suspend (void)   Suspend the timer. More...
  CPerfLogGuardCPerfLogGuard::AddParameter (CTempString name, CTempString value)   Add info to the resource's description. More...
  void  CPerfLogGuard::Post (CRequestStatus::ECode status, CTempString status_msg=CTempString())   Write the collected resource info and timing to the log. More...
  void  CPerfLogGuard::Post (int status, CTempString status_msg=CTempString())   void  CPerfLogGuard::Discard (void)   Discard the results. More...
    CPerfLogGuard::~CPerfLogGuard ()   If Post() or Discard() have not been called, then log the collected info with status 500. More...
  CPerfLoggerCPerfLogGuard::GetLogger (void)   Access logger directly. More...
    CSharedHitId::CSharedHitId (const string &hit_id)   Set new hit id, checks its validity. More...
    CSharedHitId::CSharedHitId (void)     CSharedHitId::~CSharedHitId (void)   bool  CSharedHitId::Empty (void) const   void  CSharedHitId::SetShared (void) const   Mark this hit id as a shared one and start using shared counter. More...
  bool  CSharedHitId::IsShared (void) const   Check if shared counter is used. More...
  const stringCSharedHitId::GetHitId (void) const   Get hit id value. More...
  void  CSharedHitId::SetHitId (const string &hit_id)   Set new hit id value. This resets sub-hit counter and makes it non-shared. More...
  TSubHitId  CSharedHitId::GetCurrentSubHitId (void) const   Get current sub-hit id value. More...
  TSubHitId  CSharedHitId::GetNextSubHitId (void)   Get next sub-hit id value. More...
  bool  CSharedHitId::IsRequestLevel (void) const   Check if this hit ID was set at request level. More...
  void  CSharedHitId::x_SetHitId (const string &hit_id)   Set new hit id, checks its validity. More...
  virtual  IRequestTracer::~IRequestTracer (void)   virtual void  IRequestTracer::OnRequestStart (CRequestContext &context)=0   virtual void  IRequestTracer::OnRequestStop (CRequestContext &context)=0   virtual  ITracerSpan::~ITracerSpan (void)   virtual void  ITracerSpan::SetName (const string &name)=0   virtual void  ITracerSpan::SetAttribute (ESpanAttribute attr, const string &value)=0   virtual void  ITracerSpan::SetCustomAttribute (const string &attr, const string &value)=0   virtual void  ITracerSpan::SetHttpHeader (EHttpHeaderType header_type, const string &name, const string &value)=0   virtual void  ITracerSpan::SetSpanStatus (ESpanStatus status)=0   virtual const stringITracerSpan::GetTraceState (void) const =0   virtual const stringITracerSpan::GetTraceParent (void) const =0   virtual void  ITracerSpan::PostEvent (const SDiagMessage &message)=0   virtual void  ITracerSpan::EndSpan (void)=0     CRequestContext::CRequestContext (TContextFlags flags=fDefault)   virtual  CRequestContext::~CRequestContext (void)   TCount  CRequestContext::GetRequestID (void) const   Get request ID (or zero if not set). More...
  void  CRequestContext::SetRequestID (TCount rid)   Set request ID. More...
  bool  CRequestContext::IsSetRequestID (void) const   Check if request ID was assigned a value. More...
  void  CRequestContext::UnsetRequestID (void)   Reset request ID. More...
  TCount  CRequestContext::SetRequestID (void)   Assign the next available request ID to this request. More...
  static TCount  CRequestContext::GetNextRequestID (void)   Return the next available application-wide request ID. More...
  EDiagAppState  CRequestContext::GetAppState (void) const   Application state. More...
  void  CRequestContext::SetAppState (EDiagAppState state)   string  CRequestContext::GetClientIP (void) const   Client IP/hostname. More...
  void  CRequestContext::SetClientIP (const string &client)   bool  CRequestContext::IsSetClientIP (void) const   bool  CRequestContext::IsSetExplicitClientIP (void) const   void  CRequestContext::UnsetClientIP (void)   string  CRequestContext::GetSessionID (void) const   Session ID. More...
  void  CRequestContext::SetSessionID (const string &session)   bool  CRequestContext::IsSetSessionID (void) const   bool  CRequestContext::IsSetExplicitSessionID (void) const   Does not check default SID. More...
  void  CRequestContext::UnsetSessionID (void)   const stringCRequestContext::SetSessionID (void)   Create and set new session ID. More...
  string  CRequestContext::GetEncodedSessionID (void) const   Get URL-encoded session ID. More...
  string  CRequestContext::GetHitID (void) const   Get explicit hit id or the default one (from HTTP_NCBI_PHID etc). More...
  void  CRequestContext::SetHitID (const string &hit)   Set explicit hit id. The id is reset on request end. More...
  bool  CRequestContext::IsSetHitID (EHitIDSource src=eHitID_Any) const   Check if there's an explicit hit id or the default one. More...
  bool  CRequestContext::IsSetExplicitHitID (void) const   Check if there's an explicit hit id. More...
  void  CRequestContext::UnsetHitID (void)   Reset explicit hit id. More...
  const stringCRequestContext::SetHitID (void)   Generate unique hit id, assign it to this request, return the hit id value. More...
  const stringCRequestContext::GetNextSubHitID (CTempString prefix=CTempString())   Get current hit id appended with auto-incremented sub-hit id. More...
  const stringCRequestContext::GetCurrentSubHitID (CTempString prefix=CTempString())   Get the last generated sub-hit id. More...
  bool  CRequestContext::IsSetDtab (void) const   Dtab. More...
  const stringCRequestContext::GetDtab (void) const   void  CRequestContext::SetDtab (const string &dtab)   void  CRequestContext::UnsetDtab (void)   int  CRequestContext::GetRequestStatus (void) const   Request exit status. More...
  void  CRequestContext::SetRequestStatus (int status)   void  CRequestContext::SetRequestStatus (CRequestStatus::ECode code)   bool  CRequestContext::IsSetRequestStatus (void) const   void  CRequestContext::UnsetRequestStatus (void)   const CStopWatchCRequestContext::GetRequestTimer (void) const   Request execution timer. More...
  CStopWatchCRequestContext::GetRequestTimer (void)   Int8  CRequestContext::GetBytesRd (void) const   Bytes read. More...
  void  CRequestContext::SetBytesRd (Int8 bytes)   bool  CRequestContext::IsSetBytesRd (void) const   void  CRequestContext::UnsetBytesRd (void)   Int8  CRequestContext::GetBytesWr (void) const   Bytes written. More...
  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. More...
  void  CRequestContext::SetProperty (const string &name, const string &value)   Add/change property. More...
  const stringCRequestContext::GetProperty (const string &name) const   Get property value or empty string. More...
  bool  CRequestContext::IsSetProperty (const string &name) const   Check if the property has a value (even if it's an empty string). More...
  void  CRequestContext::UnsetProperty (const string &name)   Remove property from the map. More...
  const TPropertiesCRequestContext::GetProperties (void) const   Get all properties (read only) More...
  TPropertiesCRequestContext::GetProperties (void)   Get all properties (non-const) More...
  void  CRequestContext::SetAutoIncRequestIDOnPost (bool enable)   Auto-increment request ID with every posted message. More...
  bool  CRequestContext::GetAutoIncRequestIDOnPost (void) const   Get auto-increment state. More...
  static void  CRequestContext::SetDefaultAutoIncRequestIDOnPost (bool enable)   Set default auto-increment flag used for each default request context. More...
  static bool  CRequestContext::GetDefaultAutoIncRequestIDOnPost (void)   Get default auto-increment flag. More...
  static bool  CRequestContext::IsValidSessionID (const string &session_id)   Check if session id fits the allowed format. More...
  static EOnBadSessionID  CRequestContext::GetBadSessionIDAction (void)   Get/set session id error action. More...
  static void  CRequestContext::SetBadSessionIDAction (EOnBadSessionID action)   static ESessionIDFormat  CRequestContext::GetAllowedSessionIDFormat (void)   Get/set allowed session id format. More...
  static void  CRequestContext::SetAllowedSessionIDFormat (ESessionIDFormat fmt)   CRef< CRequestContextCRequestContext::Clone (void) const   Copy current request context to a new one. More...
  static string  CRequestContext::SelectLastHitID (const string &hit_ids)   Select the last hit id from the list of ids separated with commas and optional spaces. More...
  static string  CRequestContext::SelectLastSessionID (const string &session_ids)   Select the last session id from the list of ids separated with commas and optional spaces, ignore UNK_SESSION value. More...
  void  CRequestContext::AddPassThroughProperty (const string &name, const string &value)   Add pass-through value if it matches a pattern from NCBI_CONTEXT_FIELDS. More...
  void  CRequestContext::SetReadOnly (bool read_only)   Switch request context to read-only mode. More...
  bool  CRequestContext::GetReadOnly (void) const   Get current read-only flag. More...
  void  CRequestContext::SetDisabledAppLog (bool disable)   bool  CRequestContext::GetDisabledAppLog (void) const   void  CRequestContext::SetDisabledAppLogEvents (CDiagContext::EDisabledAppLogEvents events)   CDiagContext::EDisabledAppLogEvents  CRequestContext::GetDisabledAppLogEvents (void) const   TVersion  CRequestContext::GetVersion (void) const   Return version increased on every context change (hit/subhit id, client ip, session id). More...
  static void  CRequestContext::SetRequestTracer (const shared_ptr< IRequestTracer > &tracer)   Set request tracer to be called on context events (start/stop etc.). More...
  void  CRequestContext::SetTracerSpanKind (ITracerSpan::ESpanKind kind)   At least Opentememetry tracer allows to set span kind only at span creation time. More...
  ITracerSpan::ESpanKind  CRequestContext::GetTracerSpanKind (void) const   void  CRequestContext::SetTracerSpan (const shared_ptr< ITracerSpan > &span)   shared_ptr< ITracerSpanCRequestContext::GetTracerSpan (void) const   const string  CRequestContext::GetTraceState (void) const   OpenTelemetry: get 'tracestate' and 'traceparent' values to be passed in HTTP headers. More...
  const string  CRequestContext::GetTraceParent (void) const   void  CRequestContext::SetSrcTraceState (const string &state)   OpenTelemetry: set the incoming 'tracestate' and 'traceparent' values. More...
  void  CRequestContext::SetSrcTraceParent (const string &parent)   const stringCRequestContext::GetSrcTraceState (void) const   The getters provide access to the incoming values (unlike GetTraceState and GetTraceParent which return the new values to be used for outgoing connections). More...
  const stringCRequestContext::GetSrcTraceParent (void) const     CRequestContext::CRequestContext (const CRequestContext &)   CRequestContextCRequestContext::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)   void  CRequestContext::x_LogHitID (bool ignore_app_state=false) const   void  CRequestContext::x_SetHitID (const CSharedHitId &hit_id)   string  CRequestContext::x_GetHitID (CDiagContext::EDefaultHitIDFlags flag) const   void  CRequestContext::x_UpdateSubHitID (bool increment, CTempString prefix)   static boolCRequestContext::sx_GetDefaultAutoIncRequestIDOnPost (void)   bool  CRequestContext::x_IsSetPassThroughProp (CTempString name, bool update) const   void  CRequestContext::x_SetPassThroughProp (CTempString name, CTempString value, bool update) const   const stringCRequestContext::x_GetPassThroughProp (CTempString name, bool update) const   void  CRequestContext::x_ResetPassThroughProp (CTempString name, bool update) const   void  CRequestContext::x_UpdateStdPassThroughProp (CTempString name) const   void  CRequestContext::x_UpdateStdContextProp (CTempString name) const   static const CMaskCRequestContext::sx_GetContextFieldsMask (void)   static string  CRequestContext::sx_NormalizeContextPropertyName (const string &name)   void  CRequestContext::x_LoadEnvContextProperties (void)   bool  CRequestContext::x_LogHitIDOnError (void) const   bool  CRequestContext::x_CanModify (void) const   void  CRequestContext::x_Modify (void)     CRequestContext_PassThrough::CRequestContext_PassThrough (void)   Get CRequestContext_PassThrough for the current request context. More...
    CRequestContext_PassThrough::CRequestContext_PassThrough (CRequestContext ctx)   Get CRequestContext_PassThrough for the specific request context. More...
  bool  CRequestContext_PassThrough::IsSet (CTempString name) const   Check if the property is set. More...
  void  CRequestContext_PassThrough::Set (CTempString name, CTempString value)   Set or update property value. More...
  const stringCRequestContext_PassThrough::Get (CTempString name) const   Get current property value or empty string if it's not set;. More...
  void  CRequestContext_PassThrough::Reset (CTempString name)   Reset property. More...
  string  CRequestContext_PassThrough::Serialize (EFormat format) const   Serialize current values using the specified format. More...
  void  CRequestContext_PassThrough::Deserialize (CTempString data, EFormat format)   Deserialize values using the specified format. More...
  template<class TCallback > void  CRequestContext_PassThrough::Enumerate (TCallback callback)   Enumerate all properties. More...
  string  CRequestContext_PassThrough::x_SerializeUrlEncoded (void) const   void  CRequestContext_PassThrough::x_DeserializeUrlEncoded (CTempString data)     CRequestContextGuard_Base::CRequestContextGuard_Base (CRequestContext *context, TFlags flags=0)   Initialize guard. More...
    CRequestContextGuard_Base::~CRequestContextGuard_Base (void)   Destroy guard. More...
  void  CRequestContextGuard_Base::SetStatus (int status)   Set request context status. More...
  void  CRequestContextGuard_Base::SetDefaultErrorStatus (int status)   Set default error status, which will be used if an uncaught exception is detected. More...
  CRequestContextCRequestContextGuard_Base::GetRequestContext () const   Get the guarded request context. More...
  void  CRequestContextGuard_Base::Release (void)   Release the guarded context, restore the saved context if any, do not perform any other actions (logging, setting status). More...
  virtual const char *  CRequestContextException::GetErrCodeString (void) const override   Translate from the error code value to its string representation. More...
    CRequestContextException::NCBI_EXCEPTION_DEFAULT (CRequestContextException, CException)   static string  CRequestStatus::GetStdStatusMessage (ECode code)     CSysLog::CSysLog (const string &ident=kEmptyStr, TFlags flags=fNoOverride, EFacility default_facility=eDefaultFacility)     CSysLog::CSysLog (const string &ident, TFlags flags, int default_facility)     CSysLog::~CSysLog ()   void  CSysLog::Post (const SDiagMessage &mess)   Post message to handler. More...
  void  CSysLog::Post (const string &message, EPriority priority, EFacility facility=eDefaultFacility)   void  CSysLog::Post (const string &message, EPriority priority, int facility)   void  CSysLog::HonorRegistrySettings (const IRegistry *reg=0)   string  CSysLog::GetLogName (void)   Get current diag posts destination. More...
  static int  CSysLog::x_TranslateFlags (TFlags flags)   int  CSysLog::x_TranslateFacility (EFacility facility)   void  CSysLog::x_Connect (void)     CSysLog::DECLARE_CLASS_STATIC_MUTEX (sm_Mutex)   TNcbiLog_MTLock  NcbiLog_MTLock_Create (void *user_data, FNcbiLog_MTLock_Handler handler)   Create new MT lock. More...
  void  NcbiLog_MTLock_Delete (TNcbiLog_MTLock lock)   Call cleanup action on the handler, then destroy it. More...
  int  NcbiLog_Default_MTLock_Handler (void *user_data, ENcbiLog_MTLock_Action action)   Default implementation of simple MT locking callback. More...
  void  NcbiLog_Init (const char *appname, TNcbiLog_MTLock mt_lock, ENcbiLog_MTLock_Ownership mt_lock_ownership)   Initializing NcbiLog API. More...
  void  NcbiLog_InitMT (const char *appname)   Version of NcbiLog_Init with default MT lock implementation. More...
  void  NcbiLog_InitST (const char *appname)   Version of NcbiLog_Init to use in single-threaded applications. More...
  void  NcbiLog_InitForAttachedContext (const char *appname)   Version of NcbiLog_Init to use with NcbiLog_Context_* functions only. More...
  void  NcbiLog_InitForAttachedContextST (const char *appname)   Version of NcbiLog_InitForAttachedContext() intended to use in single-threaded applications. More...
  void  NcbiLog_Destroy (void)   Destroy NcbiLog API. More...
  void  NcbiLog_Destroy_Thread (void)   Destroy thread-specific NcbiLog API information. More...
  void  NcbiLog_UpdateOnFork (TNcbiLog_OnForkFlags flags)   Update logging internal information after fork(). More...
  const char *  NcbiLog_GetHostName (void)   Get host name. More...
  const char *  NcbiLog_GetHostRole (void)   Get host role. More...
  const char *  NcbiLog_GetHostLocation (void)   Get host location. More...
  ENcbiLog_Destination  NcbiLog_SetDestination (ENcbiLog_Destination ds)   Set up diagnostics destination. More...
  ENcbiLog_Destination  NcbiLog_SetDestinationFile (const char *logfile_base)   Variant of NcbiLog_SetDestination for logging to a specific file (eNcbiLog_File). More...
  void  NcbiLog_SetSplitLogFile (int value)   Set split log files flag. More...
  void  NcbiLog_SetProcessId (TNcbiLog_PID pid)   Set process ID (PID). More...
  void  NcbiLog_SetThreadId (TNcbiLog_TID tid)   Set thread ID (TID). More...
  void  NcbiLog_SetRequestId (TNcbiLog_Counter rid)   Set current request ID (RID). More...
  TNcbiLog_Counter  NcbiLog_GetRequestId (void)   Get current request ID (RID). More...
  void  NcbiLog_SetTime (time_t timer, unsigned long nanoseconds)   Set the posting date and time. More...
  void  NcbiLog_SetHost (const char *host)   Set the host name. More...
  void  NcbiLog_AppSetClient (const char *client)   Set client for the whole application. More...
  void  NcbiLog_SetClient (const char *client)   Set client for the request. More...
  void  NcbiLog_AppSetSession (const char *session)   Set session ID (SID) for the whole application. More...
  char *  NcbiLog_AppGetSession (void)   Get session ID (SID) for the whole application. More...
  void  NcbiLog_AppNewSession (void)   Auto-generate and then set brand-new application-wide session ID (SID). More...
  char *  NcbiLog_GetSession (void)   Get sessio ID (SID) for the request. More...
  void  NcbiLog_SetSession (const char *session)   Set session ID (SID) for the request. More...
  void  NcbiLog_NewSession (void)   Auto-generate and then set brand-new session ID (SID) for the request. More...
  void  NcbiLog_AppSetHitID (const char *hit_id)   Set hit ID (HID, a.k.a. More...
  void  NcbiLog_SetHitID (const char *hit_id)   Set hit ID (HID, a.k.a. More...
  char *  NcbiLog_AppGetHitID (void)   Get hit ID (HID, a.k.a. More...
  char *  NcbiLog_GetHitID (void)   Get hit ID (HID, a.k.a. More...
  char *  NcbiLog_GetNextSubHitID_Prefix (const char *prefix)   Generate a sub-hit ID based on the currently effective (whether it's request-specific or application-wide) hit ID. More...
  char *  NcbiLog_GetNextSubHitID (void)   char *  NcbiLog_GetCurrentSubHitID_Prefix (const char *prefix)   Get the last generated sub-hit ID. More...
  char *  NcbiLog_GetCurrentSubHitID (void)   void  NcbiLog_AppNewHitID (void)   void  NcbiLog_NewHitID (void)   void  NcbiLog_FreeMemory (void *ptr)   Free memory allocated inside the C logging API. More...
  ENcbiLog_Severity  NcbiLog_SetPostLevel (ENcbiLog_Severity sev)   Set new posting severity threshold. More...
  TNcbiLog_Context  NcbiLog_Context_Create (void)   Create new thread-specific logging context object. More...
  int  NcbiLog_Context_Attach (TNcbiLog_Context ctx)   Attach logging context object to the C Logging API. More...
  void  NcbiLog_Context_Detach (void)   Detach logging context object from the C Logging API. More...
  void  NcbiLog_Context_Destroy (TNcbiLog_Context ctx)   Destroy context structure. More...
  ENcbiLog_AppState  NcbiLog_GetState (void)   Get current logging execution state (context and thread specific). More...
  void  NcbiLog_AppStart (const char *argv[])   Should be called as soon as possible during application initialization. More...
  void  NcbiLog_AppRun (void)   Should be called after the application is initialized and before its main part. More...
  void  NcbiLog_AppStop (int exit_status)   Should be called immediately prior to the application exit. More...
  void  NcbiLog_AppStopSignal (int exit_status, int exit_signal)   The same as NcbiLog_AppStop(), except it also accepts a signal number, if application exited due to a signal. More...
  void  NcbiLog_ReqStart (const SNcbiLog_Param *params)   Should be called once application startup is complete, before any request processing code is run. More...
  void  NcbiLog_ReqRun (void)   Should be called once request processing initialization is complete. More...
  void  NcbiLog_ReqStop (int status, size_t bytes_rd, size_t bytes_wr)   Should be called once request processing is complete. More...
  void  NcbiLog_Extra (const SNcbiLog_Param *params)   Can be called at any time. More...
  void  NcbiLog_Perf (int status, double timespan, const SNcbiLog_Param *params)   Can be called at any time. More...
  void  NcbiLog_Trace (const char *msg)   Writes a message to the <appname>.trace file at level 'TRACE'. More...
  void  NcbiLog_Info (const char *msg)   Writes a message to the <appname>.trace file at level 'INFO'. More...
  void  NcbiLog_Warning (const char *msg)   Writes a message to the <appname>.err log at level 'WARNING'. More...
  void  NcbiLog_Error (const char *msg)   Writes a message to the <appname>.err log at level 'ERROR'. More...
  void  NcbiLog_Critical (const char *msg)   Writes a message to the <appname>.err log at level 'CRITICAL'. More...
  void  NcbiLog_Fatal (const char *msg)   Writes a message to the <appname>.err log at level 'FATAL' and then terminate the application. More...
  void  NcbiLog_Note (ENcbiLog_Severity sev, const char *msg)   Writes a message using "Note[X]" notation for severity. More...
  template<> const CNcbiDiagCNcbiDiag::operator<< (const char *const &x) const   class  CDiagCompileInfo::CNcbiDiag   class  SDiagMessage::CDiagContext   class  SDiagMessage::CDiagContext_Extra   class  CDiagContext_Extra::CDiagContext   class  CDiagContext::CDiagContext_Extra   class  CDiagContext::CDiagContextThreadData   class  CDiagContext::CDiagBuffer   class  CDiagContext::CRequestContext   class  COpentelemetryTracerSpan::COpentelemetryTracer   class  CPerfLogger::CPerfLogGuard   class  CRequestContext::CDiagContext   class  CRequestContext::CDiagBuffer   class  CRequestContext::CDiagContextThreadData   class  CRequestContext::CRequestContext_PassThrough   const CNcbiDiagMDiagModule::operator<< (const CNcbiDiag &diag, const MDiagModule &module)   const CNcbiDiagMDiagClass::operator<< (const CNcbiDiag &diag, const MDiagClass &nclass)   const CNcbiDiagMDiagFunction::operator<< (const CNcbiDiag &diag, const MDiagFunction &function)   const CNcbiDiagCNcbiDiag::Reset (const CNcbiDiag &diag)   Reset the content of current message. More...
  const CNcbiDiagCNcbiDiag::Endm (const CNcbiDiag &diag)   Flush current message, start new one. More...
  const CNcbiDiagCNcbiDiag::Info (const CNcbiDiag &diag)   Flush current message, then set a severity for the next diagnostic message to INFO. More...
  const CNcbiDiagCNcbiDiag::Warning (const CNcbiDiag &diag)   Flush current message, then set a severity for the next diagnostic message to WARNING. More...
  const CNcbiDiagCNcbiDiag::Error (const CNcbiDiag &diag)   Flush current message, then set a severity for the next diagnostic message to ERROR. More...
  const CNcbiDiagCNcbiDiag::Critical (const CNcbiDiag &diag)   Flush current message, then set a severity for the next diagnostic message to CRITICAL ERROR. More...
  const CNcbiDiagCNcbiDiag::Fatal (const CNcbiDiag &diag)   Flush current message, then set a severity for the next diagnostic message to FATAL. More...
  const CNcbiDiagCNcbiDiag::Trace (const CNcbiDiag &diag)   Flush current message, then set a severity for the next diagnostic message to TRACE. More...
  const CNcbiDiagCNcbiDiag::Message (const CNcbiDiag &diag)   Set IsMessage flag to indicate that the current post is a message. More...
  const CNcbiDiagCNcbiDiag::Note (const CNcbiDiag &diag)   Set IsNote flag to indicate that the current post is a note. More...
  const CNcbiDiagCNcbiDiag::Console (const CNcbiDiag &diag)   Set IsConsole flag to indicate that the current post should go to console regardless of its severity (in addition to the default output – file etc.). More...
  const CNcbiDiagCNcbiDiag::StackTrace (const CNcbiDiag &diag)   Print stack trace. More...
  CDiagContext_Extra  CDiagContext_Extra::g_PostPerf (int status, double timespan, SDiagMessage::TExtraArgs &args)   ◆ __STDC_FORMAT_MACROS ◆ DIAG_COMPILE_INFO #define DIAG_COMPILE_INFO Value:

NCBI_NS_NCBI::CDiagCompileInfo(__FILE__, \

__LINE__, \

#define NCBI_MAKE_MODULE(module)

Set default module name based on NCBI_MODULE macro.

#define NCBI_CURRENT_FUNCTION

Get current function name.

Make compile time diagnostic information object to use in CNcbiDiag and CException.

This macro along with functionality of macro NCBI_MAKE_MODULE and of constructor CDiagCompileInfo ensures that if variable NCBI_MODULE will be defined then its value will be used as module name, but if it isn't defined then module name in CDiagCompileInfo will be empty. "Checking" of definition of NCBI_MODULE is performed at the moment of macro issuing so you can define and redefine NCBI_MODULE several times during one cpp-file. But BE WARNED that macro NCBI_MODULE is considered as not defined when used in any header file. So if you want for example make some error posting from inline function defined in hpp-file and want your custom module name to be shown in error message then you have to use MDiagModule manipulator as following:

ERR_POST_X(1, MDiagModule("MY_MODULE_NAME") << "Error message" );

See also
CDiagCompileInfo

Definition at line 170 of file ncbidiag.hpp.

◆ DIAG_MESSAGE_FILE #define DIAG_MESSAGE_FILE   "MessageFile" ◆ DIAG_POST_LEVEL #define DIAG_POST_LEVEL   "DIAG_POST_LEVEL"

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 1447 of file ncbidiag.hpp.

◆ DIAG_TRACE #define DIAG_TRACE   "DIAG_TRACE" ◆ ERR_FATAL #define ERR_FATAL (   message ) Value:

#define DIAG_COMPILE_INFO

Make compile time diagnostic information object to use in CNcbiDiag and CException.

@ eDiag_Fatal

Fatal error – guarantees exit(or abort)

void EndmFatal(const CNcbiDiag &diag)

Posting fatal error and abort.

This macro is deprecated and it's strongly recomended to move in all projects (except tests) to macro ERR_FATAL_X to make possible more flexible error statistics and logging.

See also
ERR_FATAL_X, ERR_POST

Definition at line 240 of file ncbidiag.hpp.

◆ ERR_FATAL_EX #define ERR_FATAL_EX (   err_code,   err_subcode,   message  ) Value:

#define ErrCode()

Get the error code for the last failed system function.

Definition at line 266 of file ncbidiag.hpp.

◆ ERR_FATAL_X ◆ ERR_FATAL_XX #define ERR_FATAL_XX (   error_name,   err_subcode,   message  ) Value:

message)

#define NCBI_ERRCODE_X_NAME(name)

Returns value of error code by its name defined by NCBI_DEFINE_ERRCODE_X.

#define ERR_FATAL_EX(err_code, err_subcode, message)

#define NCBI_ERR_SUBCODE_X_NAME(name, subcode)

Pass subcode as argument with check of its validity for given error code.

Definition at line 574 of file ncbidiag.hpp.

◆ ERR_POST #define ERR_POST (   message ) ◆ ERR_POST_EX #define ERR_POST_EX (   err_code,   err_subcode,   message  ) Value:

<< message \

<< NCBI_NS_NCBI::Endm )

Error posting with error codes.

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.

See also
ERR_POST, ERR_POST_X

Definition at line 252 of file ncbidiag.hpp.

◆ ERR_POST_N_TIMES

Error posting only given number of times during program execution.

Definition at line 594 of file ncbidiag.hpp.

◆ ERR_POST_ONCE

Error posting only once during program execution.

Definition at line 602 of file ncbidiag.hpp.

◆ ERR_POST_X

Error posting with default error code and given error subcode.

Also checks subcode correctness. When error subcode is incorrect (greater than defined in NCBI_DEFINE_ERRCODE_X) compile-time error is issued. All calls to ERR_POST_X under the same default error code MUST be with deferent error subcodes to make possible more flexible error statistics and logging. If using the macro leads to compile errors containing strings like "err_code_x" or "ErrCodeX" in messages, it means you didn't define error code name with NCBI_DEFINE_ERRCODE_X macro or didn't select current default error code with valid NCBI_USE_ERRCODE_X definition. This macro allows the use of only constant error subcodes (integer literals or enum constants). If you need to make variable error subcode you need to use macro ERR_POST_EX as follows:

NCBI_DEFINE_ERRCODE_X(Corelib_Util, 110, 5); ... #define NCBI_USE_ERRCODE_X Corelib_Util ... ERR_POST_EX(NCBI_ERRCODE_X, my_subcode, "My error message with variables " << var);

Or in more complicated way:

NCBI_DEFINE_ERRCODE_X(Corelib_Util, 110, 5); ... // no need to define NCBI_USE_ERRCODE_X ... ERR_POST_EX(NCBI_ERRCODE_X_NAME(Corelib_Util), my_subcode, "My error message with variables " << var);

It's strongly recommended to use macro NCBI_CHECK_ERR_SUBCODE_X (or NCBI_CHECK_ERR_SUBCODE_X_NAME in complicated case) to check validity of error subcodes in places where variable 'my_subcode' is assigned.

See also
NCBI_DEFINE_ERRCODE_X, NCBI_ERRCODE_X, ERR_POST_EX

Definition at line 550 of file ncbidiag.hpp.

◆ ERR_POST_X_N_TIMES ◆ ERR_POST_X_ONCE #define ERR_POST_X_ONCE (   err_subcode,   message  )     ERR_POST_X_N_TIMES(1, err_subcode, message) ◆ ERR_POST_XX #define ERR_POST_XX (   error_name,   err_subcode,   message  ) Value:

message)

#define ERR_POST_EX(err_code, err_subcode, message)

Error posting with error codes.

Error posting with error code having given name and with given error subcode.

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.

See also
NCBI_DEFINE_ERRCODE_X, ERR_POST_X

Definition at line 564 of file ncbidiag.hpp.

◆ ERR_POST_XX_N_TIMES #define ERR_POST_XX_N_TIMES (   count,   error_name,   err_subcode,   message  ) Value:

(error_name, err_subcode, message) )

#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 ERR_POST_XX(error_name, err_subcode, message)

Error posting with error code having given name and with given error subcode.

Error posting only given number of times during program execution with given error code name and given error subcode.

See also
NCBI_DEFINE_ERRCODE_X, ERR_POST_XX

Definition at line 631 of file ncbidiag.hpp.

◆ ERR_POST_XX_ONCE #define ERR_POST_XX_ONCE (   error_name,   err_subcode,   message  )     ERR_POST_XX_N_TIMES(1, error_name, err_subcode, message) ◆ INFO_POST ◆ INFO_POST_EX ◆ INFO_POST_X ◆ LOG_POST #define LOG_POST (   message ) Value:

<< message \

<< NCBI_NS_NCBI::Endm )

@ eDPF_IsNote

Print "Note[X]" severity name.

@ eDPF_Log

Print the posted message only; without severity, location, prefix, etc.

@ eDiag_Error

Error message.

This macro is deprecated and 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.

See also
LOG_POST_EX, LOG_POST_X

Definition at line 226 of file ncbidiag.hpp.

◆ LOG_POST_EX #define LOG_POST_EX (   err_code,   err_subcode,   message  ) Value:

<< message \

<< NCBI_NS_NCBI::Endm )

Definition at line 258 of file ncbidiag.hpp.

◆ LOG_POST_N_TIMES ◆ LOG_POST_ONCE ◆ LOG_POST_X ◆ LOG_POST_X_N_TIMES ◆ LOG_POST_X_ONCE ◆ LOG_POST_XX #define LOG_POST_XX (   error_name,   err_subcode,   message  ) Value:

message)

#define LOG_POST_EX(err_code, err_subcode, message)

Definition at line 569 of file ncbidiag.hpp.

◆ LOG_POST_XX_N_TIMES #define LOG_POST_XX_N_TIMES (   count,   error_name,   err_subcode,   message  ) Value:

(error_name, err_subcode, message) )

#define LOG_POST_XX(error_name, err_subcode, message)

Definition at line 635 of file ncbidiag.hpp.

◆ LOG_POST_XX_ONCE ◆ NCBI_CHECK_ERR_SUBCODE_X

Issue compile-time error if error subcode given is not valid for current error code.

Definition at line 464 of file ncbidiag.hpp.

◆ NCBI_CHECK_ERR_SUBCODE_X_NAME #define NCBI_CHECK_ERR_SUBCODE_X_NAME (   name,   subcode  ) Value:

(int)sizeof(NCBI_NS_NCBI::WRONG_ERROR_SUBCODE_IN_POST_MACRO< \

((unsigned int)subcode > \

>) \

)

void CheckErrSubcodeX(int)

Additional dummy function for use in NCBI_CHECK_ERR_SUBCODE_X macro.

#define NCBI_MAX_ERR_SUBCODE_X_NAME(name)

Returns maximum value of error subcode within error code with given name.

Issue compile-time error if error subcode given is not valid for given error code 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).

See also
ERR_POST_X

Definition at line 452 of file ncbidiag.hpp.

◆ NCBI_CHECK_ERRCODE_USAGE #define NCBI_CHECK_ERRCODE_USAGE (   name ) 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> \

) \

{}

#define NCBI_NAME2(Name1, Name2)

Name concatenation macro with two names.

Check that NCBI_DEFINE_ERR_SUBCODE_X is used for correctly defined error code.

Definition at line 432 of file ncbidiag.hpp.

◆ NCBI_CURRENT_FUNCTION

Get current function name.

Defined inside of either a method or a function body only.

Definition at line 142 of file ncbidiag.hpp.

◆ NCBI_DEFINE_ERR_SUBCODE_X

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);

See also
NCBI_DEFINE_ERRCODE_X, NCBI_DEFINE_ERR_SUBCODE_XX

Definition at line 333 of file ncbidiag.hpp.

◆ NCBI_DEFINE_ERR_SUBCODE_XX #define NCBI_DEFINE_ERR_SUBCODE_XX (   name,   max_err_subcode  ) Value:

namespace err_code_x { \

template <> \

struct

NCBI_NAME2

(SErrCodeX_Max_, name)<

true

> { \

enum { \

value = max_err_subcode \

}; \

}; \

}

#define NCBI_CHECK_ERRCODE_USAGE(name)

Check that NCBI_DEFINE_ERR_SUBCODE_X is used for correctly defined error code.

Define maximum value of subcode for particular error code name.

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);

See also
NCBI_DEFINE_ERRCODE_X

Definition at line 354 of file ncbidiag.hpp.

◆ NCBI_DEFINE_ERRCODE_X #define NCBI_DEFINE_ERRCODE_X (   name,   err_code,   max_err_subcode  ) 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, \

}; \

}; \

} \

NCBI_EAT_SEMICOLON(err_code)

unsigned int

A callback function used to compare two keys in a database.

Define global error code name with given value (err_code) and given maximum value of error subcode within this code.

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 ERR_POST_X macro. 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);

See also
NCBI_DEFINE_ERR_SUBCODE_X, ERR_POST_X, NCBI_ERRCODE_X, NCBI_MAX_ERR_SUBCODE_X

Definition at line 297 of file ncbidiag.hpp.

◆ NCBI_ERR_SUBCODE_X

Pass subcode as argument with check of its validity for current error code.

Definition at line 472 of file ncbidiag.hpp.

◆ NCBI_ERR_SUBCODE_X_NAME

Pass subcode as argument with check of its validity for given error code.

Definition at line 468 of file ncbidiag.hpp.

◆ NCBI_ERRCODE_X

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.

See also
NCBI_DEFINE_ERRCODE_X

Definition at line 376 of file ncbidiag.hpp.

◆ NCBI_ERRCODE_X_NAME ◆ NCBI_MAKE_MODULE ◆ NCBI_MAX_ERR_SUBCODE_X ◆ NCBI_MAX_ERR_SUBCODE_X_NAME ◆ NCBI_REPEAT_POST_N_TIMES #define NCBI_REPEAT_POST_N_TIMES (   post_macro,   count,   params  ) Value:

do { \

static atomic<int> sx_to_show(

count

); \

int to_show = sx_to_show; \

if ( to_show > 0 ) { \

sx_to_show = to_show - 1; \

post_macro params; \

} \

} while ( false )

Common code for making log or error posting only given number of times during program execution.

This macro MUST not be used outside this header.

Definition at line 582 of file ncbidiag.hpp.

◆ NCBILOG_INT8_FORMAT_SPEC #define NCBILOG_INT8_FORMAT_SPEC   "I64"

Definition at line 290 of file ncbi_c_log.h.

◆ NCBILOG_UINT8_FORMAT_SPEC #define NCBILOG_UINT8_FORMAT_SPEC   "I64u"

Definition at line 291 of file ncbi_c_log.h.

◆ PERF_POST #define PERF_POST (   perf_logger,   status,   resource,   args  ) Value:

perf_logger.Post(CRequestStatus::status, resource) args; \

} while (false)

static bool IsON(void)

Is performance logging on, globally? Controlled by CParam(section="Log", entry="PerfLogging",...

Convenience macro that also saves cycles when the performance logging is globally turned off.

Usage example:
This example demonstrates logging a variety of performance statistics. PERF_POST

(perf_logger, e200_Ok,

"ApacheSlotStats"

,

.

Print

(

"total_slots"

,

.

Print

(

"used_slots_pct"

,

.

Print

(

"penalty"

, m_Mode == eShmem ?

"N/A"

:

void Print(const CCompactSAMApplication::AlignInfo &ai)

#define PERF_POST(perf_logger, status, resource, args)

Convenience macro that also saves cycles when the performance logging is globally turned off.

static string DoubleToString(double value, int precision=-1, TNumToStringFlags flags=0)

Convert double to string.

static const string BoolToString(bool value)

Convert bool to string.

static enable_if< is_arithmetic< TNumeric >::value||is_convertible< TNumeric, Int8 >::value, string >::type NumericToString(TNumeric value, TNumToStringFlags flags=0, int base=10)

Convert numeric value to string.

Note
The status must come from enum CRequestStatus::ECode (but without the class scope, which is added by the macro).

Definition at line 213 of file perf_log.hpp.

◆ PERF_POST_DB #define PERF_POST_DB (   perf_logger,   status,   resource,   server,   args  ) Value:

perf_logger.Post(CRequestStatus::status, resource) \

.Print("dbserver", server) args; \

} while (false)

Adaptation for logging database performance.

Usage example:
This example demonstrates logging the results of a stored procedure call.

"StoredProc123", "MSSQL444")

.Print("foo", "bar"));

#define PERF_POST_DB(perf_logger, status, resource, server, args)

Adaptation for logging database performance.

Note
The status must come from enum CRequestStatus::ECode (but without the class scope, which is added by the macro).

Definition at line 232 of file perf_log.hpp.

◆ SEVERITY_POST #define SEVERITY_POST (   severity,   message  ) Value:

ERR_POST(severity << message); \

while(0)

bool IsVisibleDiagPostLevel(EDiagSev sev)

Check if the specified severity is higher or equal to the currently selected post level and will be p...

Wrappers for ERR_POST family of macros checking if the desired severity is enabled.

See also
ERR_POST, ERR_POST_X, ERR_POST_EX

Definition at line 196 of file ncbidiag.hpp.

◆ SEVERITY_POST_EX #define SEVERITY_POST_EX (   severity,   errcode,   subcode,   message  ) Value:

ERR_POST_EX(errcode, subcode, severity << message); \

while(0)

Definition at line 210 of file ncbidiag.hpp.

◆ SEVERITY_POST_X #define SEVERITY_POST_X (   severity,   subcode,   message  ) Value:

ERR_POST_X(subcode, severity << message); \

while(0)

Definition at line 203 of file ncbidiag.hpp.

◆ TRACE_POST ◆ TRACE_POST_EX ◆ TRACE_POST_X ◆ WARNING_POST ◆ WARNING_POST_EX ◆ WARNING_POST_X ◆ CSysLogDiagHandler ◆ FAbortHandler typedef void(* FAbortHandler) (void) ◆ FDiagCleanup typedef void(* FDiagCleanup) (void *data) ◆ FDiagHandler ◆ FIosbaseManip typedef IOS_BASE&(* CNcbiDiag::FIosbaseManip) (IOS_BASE &)

Definition at line 955 of file ncbidiag.hpp.

◆ FIosManip ◆ FManip ◆ FNcbiLog_MTLock_Handler

MT locking callback.

Parameters
user_data Unspecified data to call "handler" with. Could be used to have the same handler for some different MT locks. The 'user_data' allow to distinguish each lock and adjust behavior accordingly. action Operation that should be done in the callback handler.
Returns
Non-zero value if the requested operation was successful.
Note
The "-1" value is reserved for unset handler; you also may want to return "-1" if your locking function does no locking, and you don't consider it as an error, but still want the caller to be ware of this "rightful non-doing" as opposed to the "rightful doing".
See also
NcbiLog_MTLock_Create, NcbiLog_MTLock_Delete

Definition at line 186 of file ncbi_c_log.h.

◆ TContextFlags ◆ TCount [1/3]

Generic type for counters (posts, requests etc.)

Definition at line 1605 of file ncbidiag.hpp.

◆ TCount [2/3] ◆ TCount [3/3] ◆ TDiagPostFlags ◆ TDiagUserAndHost ◆ TDiagWriteFlags ◆ TExtraArg [1/2] ◆ TExtraArg [2/2] ◆ TExtraArgs [1/2] ◆ TExtraArgs [2/2] ◆ TFields ◆ TFlags [1/2] ◆ TFlags [2/2] ◆ TInfo ◆ TMessages [1/2] ◆ TMessages [2/2]

Save messages if the handle is unavailable.

Definition at line 2694 of file ncbidiag.hpp.

◆ TNcbiLog_Context ◆ TNcbiLog_Counter ◆ TNcbiLog_Int8 ◆ TNcbiLog_MTLock ◆ TNcbiLog_OnForkFlags

Binary OR of "ENcbiLog_OnForkAction".

Definition at line 454 of file ncbi_c_log.h.

◆ TNcbiLog_PID

Process, thread and counter types.

Definition at line 302 of file ncbi_c_log.h.

◆ TNcbiLog_TID ◆ TNcbiLog_UInt8 ◆ TOnForkFlags ◆ TParent [1/2] ◆ TParent [2/2] ◆ TPassThroughProperties ◆ TPID [1/2] ◆ TPID [2/2] ◆ TProperties [1/3] ◆ TProperties [2/3] ◆ TProperties [3/3] ◆ TPropSet ◆ TReopenFlags ◆ TSharedCounter ◆ TSpan ◆ TSubHitId ◆ TTID [1/2] ◆ TTID [2/2] ◆ TTracer ◆ TUID [1/2] ◆ TUID [2/2] ◆ TVersion ◆ anonymous enum

template<int errorCode, int errorSubcode, int maxErrorSubcode>

◆ anonymous enum ◆ EAction

Action to perform in guard's destructor.

Enumerator ePrint 

Print all collected messages as is.

eDiscard 

Discard collected messages, default.

ePrintCapped 

Print collected messages at reduced severity.

Definition at line 1303 of file ncbidiag.hpp.

◆ EAppDiagStream

Where to write the application's diagnostics to.

Enumerator eDS_ToStdout 

To standard output stream.

eDS_ToStderr 

To standard error stream.

eDS_ToStdlog 

Try standard log file (app.name + ".log") in /log/ and current directory, use stderr if both fail.

eDS_ToMemory 

Keep in a temp.memory buffer, see FlushMessages()

eDS_Disable 

Don't write it anywhere.

eDS_User 

Leave as was previously set (or not set) by user.

eDS_AppSpecific 

Call the application's SetupDiag_AppSpecific()

Deprecated:
eDS_Default 

Try standard log file (app.name + ".log") in /log/, use stderr on failure.

eDS_ToSyslog 

To system log daemon.

Definition at line 1780 of file ncbidiag.hpp.

◆ ECode Enumerator e100_Continue  e101_SwitchingProtocols  e200_Ok  e201_Created  e202_Accepted  e203_NonAuthInformation  e204_NoContent  e205_ResetContent  e206_PartialContent  e299_PartialContentBrokenConnection 

Non-standard status code - used to indicate broken connection while serving partial-content request.

e300_MultipleChoices  e301_MovedPermanently  e302_Found  e303_SeeOther  e304_NotModified  e305_UseProxy  e307_TemporaryRedirect  e400_BadRequest  e401_Unauthorized  e402_PaymentRequired  e403_Forbidden  e404_NotFound  e405_MethodNotAllowed  e406_NotAcceptable  e407_ProxyAuthRequired  e408_RequestTimeout  e409_Conflict  e410_Gone  e411_LengthRequired  e412_PreconditionFailed  e413_RequestEntityTooLarge  e414_RequestURITooLong  e415_UnsupportedMediaType  e416_RangeNotSatisfiable  e417_ExpectationFailed  e422_UnprocessableEntity  e429_Too_Many_Requests  e451_Unavailable_For_Legal_Reasons  e499_BrokenConnection 

Non-standard status code - used to indicate broken connection while serving normal request.

e500_InternalServerError  e501_NotImplemented  e502_BadGateway  e503_ServiceUnavailable  e504_GatewayTimeout  e505_HTTPVerNotSupported 

Definition at line 57 of file request_status.hpp.

◆ EContextFlags

Request context flags.

Enumerator fResetOnStart 

Reset values when printing request-start.

fDefault 

Definition at line 205 of file request_ctx.hpp.

◆ EDefaultHitIDFlags Enumerator eHitID_NoCreate  eHitID_Create 

Definition at line 2347 of file ncbidiag.hpp.

◆ EDiagAppState

Application execution states shown in the std prefix.

Enumerator eDiagAppState_NotSet 

Reserved value, never used in messages.

eDiagAppState_AppBegin 

AB.

eDiagAppState_AppRun 

A.

eDiagAppState_AppEnd 

AE.

eDiagAppState_RequestBegin 

RB.

eDiagAppState_Request 

R.

eDiagAppState_RequestEnd 

RE.

Definition at line 789 of file ncbidiag.hpp.

◆ EDiagCollectMessages

Flags to control collecting messages and flushing them to the new destination when switching diag handlers.

Enumerator eDCM_Init 

Start collecting messages (with limit), do nothing if already initialized.

eDCM_InitNoLimit 

Start collecting messages without limit (must stop collecting later using eDCM_Flush or eDCM_Discard).

eDCM_NoChange 

Continue collecting messages if already started.

eDCM_Flush 

Flush the collected messages and stop collecting.

eDCM_Discard 

Discard the collected messages without flushing.

Definition at line 1798 of file ncbidiag.hpp.

◆ EDiagFileType

CDiagHandler –.

Base diagnostic handler class. Type of file for the output

Enumerator eDiagFile_Err 

Error log file.

eDiagFile_Log 

Access log file.

eDiagFile_Trace 

Trace log file.

eDiagFile_Perf 

Perf log file.

eDiagFile_All 

All log files.

Definition at line 2446 of file ncbidiag.hpp.

◆ EDiagFilter

Diag severity types to put the filter on.

See also
SetDiagFilter
Enumerator eDiagFilter_Trace 

for TRACEs only

eDiagFilter_Post 

for all non-TRACE, non-FATAL

eDiagFilter_All 

for all non-FATAL

Definition at line 2540 of file ncbidiag.hpp.

◆ EDiagPostFlag

Which parts of the diagnostic context should be posted.

Generic appearance of the posted message is as follows:

[<date> <time> ][T<TID> ][["[<path>]/<file>", ][line <line>]: ] [<severity>: ][(<err_code>.<err_subcode>) ] [<module>[::<class>]::][<function>()] - [<prefix1>::<prefix2>::<prefixN>] <message>
[ [<err_code_message>
] [<err_code_explanation>
]

Example:

See also
SDiagMessage::Compose()
Enumerator eDPF_File 

File name (not full path)

eDPF_LongFilename 

Full file path.

eDPF_Line 

Source line.

eDPF_Prefix 

Prefix (default)

eDPF_Severity 

Severity (default)

eDPF_ErrorID 

Error code and subcode (default)

eDPF_DateTime 

Include date and time.

eDPF_ErrCodeMessage 

Error code message (default)

eDPF_ErrCodeExplanation 

Error explanation (default)

eDPF_ErrCodeUseSeverity 

Use severity from error code (default)

eDPF_Location 

Include class and function if any.

eDPF_TID 

Thread ID.

eDPF_PID 
Deprecated:
eDPF_SerialNo 
Deprecated:
eDPF_SerialNo_Thread 
Deprecated:
eDPF_RequestId 
Deprecated:
eDPF_Iteration 
Deprecated:
eDPF_UID 
Deprecated:
eDPF_ErrCode 
Deprecated:
eDPF_ErrSubCode 
Deprecated:
eDPF_All 

All flags (except for the "unusual" ones!)

eDPF_Trace 

Default flags to use when tracing.

eDPF_Exception 

Default flags to use for exception formatting.

eDPF_Log 

Print the posted message only; without severity, location, prefix, etc.

eDPF_ErrCodeMsgInFront 

Put ErrCode text in front of the message.

eDPF_MergeLines 

Escape EOLs.

eDPF_PreMergeLines 

Obsolete. Use eDPF_MergeLines.

eDPF_OmitInfoSev 

No sev. indication if eDiag_Info.

eDPF_OmitSeparator 

No '—' separator before message.

eDPF_AppLog 

Post message to application log.

eDPF_IsNote 

Print "Note[X]" severity name.

eDPF_IsMessage  eDPF_AtomicWrite 

This flag is deprecated and ignored - all log writes are atomic.

For compatibility IsSetDiagPostFlag always returns true when asked about this flag.

Deprecated:
eDPF_IsConsole 

Send the message to 'console' regardless of it's severity.

To be set by 'Console' manipulator only.

eDPF_Default 

Use global default flags (merge with).

See also
SetDiagPostFlag(), UnsetDiagPostFlag(), IsSetDiagPostFlag()
eDPF_ImportantFlagsMask 

Important bits which should be taken from the globally set flags even if a user attempts to override (or forgets to set) them when calling CNcbiDiag().

eDPF_UseExactUserFlags 

Use flags provided by user as-is, do not allow CNcbiDiag to replace "important" flags by the globally set ones.

Definition at line 692 of file ncbidiag.hpp.

◆ EDiagSev

Severity level for the posted diagnostics.

Enumerator eDiag_Info 

Informational message.

eDiag_Warning 

Warning message.

eDiag_Error 

Error message.

eDiag_Critical 

Critical error message.

eDiag_Fatal 

Fatal error – guarantees exit(or abort)

eDiag_Trace 

Trace message.

eDiagSevMin 

Verbosity level for min. severity.

eDiagSevMax 

Verbosity level for max. severity.

Definition at line 650 of file ncbidiag.hpp.

◆ EDiagSevChange

Severity level change state.

Enumerator eDiagSC_Unknown 

Status of changing severity is unknown (first call)

eDiagSC_Disable 

Disable change severity level.

eDiagSC_Enable 

Enable change severity level.

Definition at line 666 of file ncbidiag.hpp.

◆ EDiagTrace

Which setting disables/enables posting of "eDiag_Trace" messages.

By default, trace messages are disabled unless:

Enumerator eDT_Default 

Restores the default tracing context.

eDT_Disable 

Ignore messages of severity "eDiag_Trace".

eDT_Enable 

Enable messages of severity "eDiag_Trace".

Definition at line 1547 of file ncbidiag.hpp.

◆ EDiagUserAndHost

Flags for SetDiagUserAndHost()

Enumerator fDiag_AddUser 

Add username to diag context.

fDiag_AddHost 

Add hostname to diag context.

fDiag_OverrideExisting 

Set current user and host even if they are already set.

Definition at line 50 of file ncbi_userhost.hpp.

◆ EDiagWriteFlags

Compose a message string in the standard format(see also "flags"): "<file>", line <line>: <severity>: [<prefix>] <message> [EOL] and put it to string "str", or write to an output stream "os".

Which write flags should be output in diagnostic message.

Enumerator fNone 

No flags.

fNoEndl 

No end of line.

fNoPrefix 

No std prefix.

Definition at line 1702 of file ncbidiag.hpp.

◆ EDisabledAppLogEvents

Flags for disabling groups of applog events with DIAG_DISABLE_APPLOG_MESSAGES.

The global value can be set using DIAG_DISABLE_APPLOG_MESSAGE_TYPES.

Enumerator eDisable_All 

Disable all applog events (default).

eEnable_App 

Allow only application start/stop.

Definition at line 2308 of file ncbidiag.hpp.

◆ EErrCode

Error types that CRequestContext can generate.

These generic error conditions can occur for corelib applications.

Enumerator eBadSession 

Invalid session id.

eBadHit 

Invalid hit id.

Definition at line 701 of file request_ctx.hpp.

◆ EEventType

Type of event to report.

Enumerator eEvent_Start 

Application start.

eEvent_Stop 

Application exit.

eEvent_Extra 

Other application events.

eEvent_RequestStart 

Start processing request.

eEvent_RequestStop 

Finish processing request.

eEvent_PerfLog 

Performance log.

Definition at line 1640 of file ncbidiag.hpp.

◆ EFacility Enumerator eDefaultFacility  eKernel  eUser  eMail  eDaemon  eAuth  eSysLog  eLPR  eNews  eUUCP  eCron  eAuthPriv  eFTP  eLocal0  eLocal1  eLocal2  eLocal3  eLocal4  eLocal5  eLocal6  eLocal7 

Definition at line 74 of file syslog.hpp.

◆ EFlags [1/2] Enumerator fPrintRequestStart 

Print request-start automatically in the constructor.

By default request-start is not printed to allow the caller log request arguments.

Definition at line 652 of file request_ctx.hpp.

◆ EFlags [2/2] Enumerator fNoOverride 

never call openlog() ourselves

fCopyToStderr 

maps to LOG_PERROR if available

fFallBackToConsole 

LOG_CONS.

fIncludePID 

LOG_PID.

fConnectNow 

LOG_NDELAY.

fNoChildWait 

LOG_NOWAIT.

fAllFlags 

Definition at line 52 of file syslog.hpp.

◆ EFormat

Supported serialization/deserialization formats.

Enumerator eFormat_UrlEncoded 

name=value pairs URL-encoded and separated with '&'

Definition at line 603 of file request_ctx.hpp.

◆ EFormatFlag Enumerator eFormat_Old  eFormat_New  eFormat_Auto 

Definition at line 1738 of file ncbidiag.hpp.

◆ EHitIDSource

Hit ID Allowed source of the current hit id.

See also
IsSetHitID
Enumerator eHitID_Any 

Any hit id - always return true.

eHitID_Request 

Check if per-request hit id is set.

eHitID_Default 

Check if default hit id is set.

eHidID_Existing 

Check if any hit is already available (will not be generated on request).

Definition at line 256 of file request_ctx.hpp.

◆ EHttpHeaderType ◆ ELogRate_Type

Type of logging rate limit.

Enumerator eLogRate_App 

Application log.

eLogRate_Err 

Error log.

eLogRate_Trace 

Trace log.

Definition at line 2276 of file ncbidiag.hpp.

◆ ENcbiLog_AppState

Application execution states shown in the std prefix.

See also
NcbiLog_GetState
Enumerator eNcbiLog_NotSet 

Reserved value, never used in messages.

eNcbiLog_AppBegin 

PB.

eNcbiLog_AppRun 

P.

eNcbiLog_AppEnd 

PE.

eNcbiLog_RequestBegin 

RB.

eNcbiLog_Request 

R.

eNcbiLog_RequestEnd 

RE.

Definition at line 994 of file ncbi_c_log.h.

◆ ENcbiLog_Destination

Where to write the application's diagnostics to.

See also
NcbiLog_SetDestination
Enumerator eNcbiLog_Default 

Try /log/<*>/<appname>.log; fallback to STDERR.

eNcbiLog_Stdlog 

Try /log/<*>/<appname>.log; fallback to .

/<appname>.log, then to STDERR

eNcbiLog_Cwd 

Try .

/<appname>.log, fallback to STDERR

eNcbiLog_File 

To specific file, see NcbiLog_SetDestinationFile()

eNcbiLog_Stdout 

To standard output stream.

eNcbiLog_Stderr 

To standard error stream.

eNcbiLog_Disable 

Don't write it anywhere.

Definition at line 246 of file ncbi_c_log.h.

◆ ENcbiLog_MTLock_Action

The action passed to user defined MT lock handler.

Enumerator eNcbiLog_MT_Init 

Init the locker (call first)

eNcbiLog_MT_Lock 

Lock.

eNcbiLog_MT_Unlock 

Unlock.

eNcbiLog_MT_Destroy 

Unlock and cleanup (call last)

Definition at line 152 of file ncbi_c_log.h.

◆ ENcbiLog_MTLock_Ownership

Type of ownership for MT lock handle.

Enumerator eNcbiLog_MT_NoOwnership 

No ownership relationship.

eNcbiLog_MT_TakeOwnership 

NcbiLog API takes ownership of MT lock.

Definition at line 162 of file ncbi_c_log.h.

◆ ENcbiLog_OnForkAction

Actions to perform in NcbiLog_UpdateOnFork()

Enumerator fNcbiLog_OnFork_UpdateID 

Update IDs (default)

fNcbiLog_OnFork_PrintStart 

Log app-start.

fNcbiLog_OnFork_ResetTimer 

Reset execution timer.

Definition at line 446 of file ncbi_c_log.h.

◆ ENcbiLog_Severity

Severity level for the posted diagnostics.

Enumerator eNcbiLog_Trace 

Trace message.

eNcbiLog_Info 

Informational message.

eNcbiLog_Warning 

Warning message.

eNcbiLog_Error 

Error message.

eNcbiLog_Critical 

Critical error message.

eNcbiLog_Fatal 

Fatal error – guarantees exit (or abort)

Definition at line 260 of file ncbi_c_log.h.

◆ EOnBadSessionID

Session ID error actions.

Enumerator eOnBadSID_Allow 

Don't validate session id.

eOnBadSID_AllowAndReport 

Accept but show warning (default).

eOnBadSID_Ignore 

Ignore bad session id.

eOnBadSID_IgnoreAndReport 

Ignore and show warning.

eOnBadSID_Throw 

Throw on bad session id.

Definition at line 365 of file request_ctx.hpp.

◆ EPostNumberIncrement

Post number increment flag for GetProcessPostNumber() and GetThreadPostNumber().

Enumerator ePostNumber_NoIncrement 

Get post number without incrementing it.

ePostNumber_Increment 

Increment and return the new post number.

Definition at line 1811 of file ncbidiag.hpp.

◆ EPriority Enumerator eEmergency  eAlert  eCritical  eError  eWarning  eNotice  eInfo  eDebug 

Definition at line 63 of file syslog.hpp.

◆ EProperty Enumerator eProp_RequestID  eProp_ClientIP  eProp_SessionID  eProp_HitID  eProp_ReqStatus  eProp_BytesRd  eProp_BytesWr  eProp_Dtab 

Definition at line 479 of file request_ctx.hpp.

◆ EPropertyMode

Property visibility flag.

Deprecated:
Enumerator eProp_Default 

Auto-mode for known properties, local for others.

eProp_Global 

The property is global for the application.

eProp_Thread 

The property has separate value in each thread.

Definition at line 2014 of file ncbidiag.hpp.

◆ EReopenFlags Enumerator fTruncate 

Truncate file to zero size.

fCheck 

Reopen only if necessary.

fDefault 

Default reopen flags:

Definition at line 2482 of file ncbidiag.hpp.

◆ ESessionIDFormat

Session ID format.

Enumerator eSID_Ncbi 

Strict NCBI format: (UID:16)_(RqID:4+)SID.

eSID_Standard 

Alpanum, underscore, -.:@, (default)

eSID_Other 

Any other format.

Definition at line 359 of file request_ctx.hpp.

◆ ESpanAttribute Enumerator eSessionId  eClientAddress  eClientPort  eServerAddress  eServerPort  eUrl  eRequestMethod  eUrlScheme  eHttpScheme  eStatusCode  eStatusString 

Definition at line 162 of file request_ctx.hpp.

◆ ESpanKind Enumerator eKind_NotSet  eKind_Internal  eKind_Server  eKind_Client 

Definition at line 155 of file request_ctx.hpp.

◆ ESpanStatus ◆ EStart

If to start the timing immediately.

Enumerator eStart 

Call Start() immediately after creating.

eSuspend 

Do not start timer (call Start() later)

Definition at line 83 of file perf_log.hpp.

◆ FLoggedHitIDFlag Enumerator fLoggedOnRequest  fLoggedOnError 

Definition at line 531 of file request_ctx.hpp.

◆ FOnForkAction

Actions to perform in UpdateOnFork().

Enumerator fOnFork_PrintStart 

Log app-start.

fOnFork_ResetTimer 

Reset execution timer.

fOnFork_AsyncSafe 

After a fork() in a multithreaded program, the child can safely call only async-signal-safe functions.

So we can do only a limited set of operations updating diag context there. Cancels both previous flags as not async-signal-safe.

Definition at line 1944 of file ncbidiag.hpp.

◆ Abort()

Smart abort function.

Processes user abort handler and does not pop up assert windows if specified (environment variable DIAG_SILENT_ABORT is "Y" or "y").

Definition at line 8254 of file ncbidiag.cpp.

References _TX, abort(), NcbiSys_getenv, s_UserAbortHandler, and rapidjson::value.

Referenced by CNcbiApplicationAPI::AppMain(), CGLFrameBuffer::CheckFBOError(), CGlUtils::CheckGlError(), CCacheBlobStream::Close(), CNcbiDiag::DiagAssert(), CNcbiDiag::DiagFatal(), EndmFatal(), CDiagContextThreadData::GetThreadData(), s_LOG_Handler(), CObject::ThrowNullPointerException(), CObjectException::x_InitErrCode(), and CCacheBlobStream::~CCacheBlobStream().

◆ AddParameter() ◆ AddPassThroughProperty() ◆ Adjust() void CPerfLogger::Adjust ( CTimeSpan  timespan ) inline ◆ AllowAsyncWrite() [1/3] ◆ AllowAsyncWrite() [2/3] ◆ AllowAsyncWrite() [3/3] ◆ AllowBadSymbolsInArgNames()

Allow bad symbols in argument names.

URL-encode names the same way as values. NOTE: Avoid using this method if possible. Argument names with encoded symbols may be incompatible with some logging tools. If the flag is not set, any bad symbol is replaced with [ILLEGAL_APPLOG_SYMBOL:%##] string, where %## is the URL-encoded symbol.

Definition at line 2315 of file ncbidiag.cpp.

References CDiagContext_Extra::m_AllowBadNames.

◆ AppendDiagFilter() ◆ ApproveMessage()

Definition at line 1578 of file ncbidiag.cpp.

References eDiag_Info, eDiag_Trace, eDPF_AppLog, IsSetDiagPostFlag(), CDiagContext::m_AppLogRC, CDiagContext::m_AppLogSuspended, CDiagContext::m_ErrLogRC, CDiagContext::m_ErrLogSuspended, CDiagContext::m_TraceLogRC, CDiagContext::m_TraceLogSuspended, and msg().

◆ CAsyncDiagHandler() CAsyncDiagHandler::CAsyncDiagHandler ( void  )

Definition at line 7314 of file ncbidiag.cpp.

◆ CDiagAutoPrefix() [1/2] CDiagAutoPrefix::CDiagAutoPrefix ( const char *  prefix ) ◆ CDiagAutoPrefix() [2/2] CDiagAutoPrefix::CDiagAutoPrefix ( const stringprefix ) ◆ CDiagCollectGuard() [1/3] CDiagCollectGuard::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).

The default action is eDiscard.

Definition at line 559 of file ncbidiag.cpp.

References eDiag_Critical, CDiagCollectGuard::eDiscard, and CDiagCollectGuard::x_Init().

◆ CDiagCollectGuard() [2/3]

Create diag collect guard with the given severities and action.

As with the other constructor variants, the optionally applied print-severity cap defaults to the collectable severity. The guard will not set print severity below the current diag post level (or print severity of a higher level guard). Collect severity should be equal or lower than the current diag post level or collect severity. The default action is eDiscard.

Definition at line 566 of file ncbidiag.cpp.

References CDiagCollectGuard::x_Init().

◆ CDiagCollectGuard() [3/3] CDiagCollectGuard::CDiagCollectGuard ( void  ) ◆ CDiagCompileInfo() [1/3] ◆ CDiagCompileInfo() [2/3] ◆ CDiagCompileInfo() [3/3] CDiagCompileInfo::CDiagCompileInfo ( void  ) ◆ CDiagContext() [1/2] ◆ CDiagContext() [2/2] CDiagContext::CDiagContext ( void  ) ◆ CDiagContext_Extra() [1/3]

Copying the object will prevent printing it on destruction.

The new copy should take care of printing.

Definition at line 2301 of file ncbidiag.cpp.

◆ CDiagContext_Extra() [2/3] CDiagContext_Extra::CDiagContext_Extra ( int  status, double  timespan, TExtraArgsargs  ) private ◆ CDiagContext_Extra() [3/3] ◆ CDiagErrCodeInfo() [1/3]

Constructor – can throw runtime_error.

◆ CDiagErrCodeInfo() [2/3] CDiagErrCodeInfo::CDiagErrCodeInfo ( const stringfile_name )

Constructor – can throw runtime_error.

◆ CDiagErrCodeInfo() [3/3] CDiagErrCodeInfo::CDiagErrCodeInfo ( void  )

Constructor.

◆ CDiagRestorer() CDiagRestorer::CDiagRestorer ( void  )

Captures current settings.

Definition at line 8087 of file ncbidiag.cpp.

References buf, CDiagLock::eWrite, GetDiagBuffer(), CDiagContext::IsApplogSeverityLocked(), CDiagRestorer::m_ApplogSeverityLocked, CDiagRestorer::m_CanDeleteErrCodeInfo, CDiagRestorer::m_CanDeleteHandler, CDiagRestorer::m_DieSeverity, CDiagRestorer::m_ErrCodeInfo, CDiagRestorer::m_Handler, CDiagRestorer::m_IgnoreToDie, CDiagRestorer::m_PostFlags, CDiagRestorer::m_PostPrefix, CDiagRestorer::m_PostSeverity, CDiagRestorer::m_PostSeverityChange, CDiagRestorer::m_PrefixList, CDiagRestorer::m_TraceDefault, and CDiagRestorer::m_TraceEnabled.

◆ CFileDiagHandler() CFileDiagHandler::CFileDiagHandler ( void  ) ◆ CFileHandleDiagHandler() ◆ CheckErrSubcodeX() void CheckErrSubcodeX ( int  ) inline

Additional dummy function for use in NCBI_CHECK_ERR_SUBCODE_X macro.

Definition at line 442 of file ncbidiag.hpp.

◆ CheckFilters() ◆ CJaegerTracer() [1/3] CJaegerTracer::CJaegerTracer ( const stringservice_name ) ◆ CJaegerTracer() [2/3] CJaegerTracer::CJaegerTracer ( const stringservice_name, const jaegertracing::Config &  config  ) ◆ CJaegerTracer() [3/3] CJaegerTracer::CJaegerTracer ( void  ) ◆ CJaegerTracerSpan() CJaegerTracerSpan::CJaegerTracerSpan ( shared_ptr< jaegertracing::Span >  span ) inline

Definition at line 57 of file jaeger_tracer.hpp.

◆ CleanupTracer() void COpentelemetryTracer::CleanupTracer ( void  ) static

Uninstall current tracer, if any.

This call is optional but may be useful, e.g. to remove current tracer before the output stream it uses is destroyed.

Definition at line 214 of file opentelemetry_tracer.cpp.

◆ Clear() void CDiagErrCodeInfo::Clear ( void  )

Delete all stored error descriptions from memory.

◆ Clone()

Copy current request context to a new one.

The method can be used to process a single request in several threads which share the same information (request id, session id etc.). NOTE: The new context is not linked to the parent one. No further changes in a context are copied to its clones. It's the developer's responsibility to track multiple clones and make sure that they are used properly (e.g. status is set by just one thread; only one request-stop is printed and no clones continue to log the same request after it's stopped).

Definition at line 592 of file request_ctx.cpp.

References CEncodedString::GetOriginalString(), CRequestContext::m_AppState, CRequestContext::m_AutoIncOnPost, CRequestContext::m_BytesRd, CRequestContext::m_BytesWr, CRequestContext::m_ClientIP, CRequestContext::m_DisabledAppLog, CRequestContext::m_DisabledAppLogEvents, CRequestContext::m_Dtab, CRequestContext::m_Flags, CRequestContext::m_HitID, CRequestContext::m_HitIDLoggedFlag, CRequestContext::m_IsReadOnly, CRequestContext::m_IsRunning, CRequestContext::m_Properties, CRequestContext::m_PropSet, CRequestContext::m_ReqStatus, CRequestContext::m_ReqTimer, CRequestContext::m_RequestID, CRequestContext::m_SessionID, CRequestContext::m_SubHitIDCache, CSharedHitId::SetShared(), and CEncodedString::SetString().

Referenced by CPSG_Request::GetCtx(), CAsyncWriteCache::GetWriteStream(), CThread::Run(), and CPSGS_Request::SetRequestContext().

◆ CNcbiDiag() [1/3]

Constructor – includes the file and line number info.

Parameters
info File, line, module sev Severity level post_flags What to post

Definition at line 7827 of file ncbidiag.cpp.

◆ CNcbiDiag() [2/3]

Private copy constructor to prohibit copy.

◆ CNcbiDiag() [3/3] ◆ CNcbiLogFields() CNcbiLogFields::CNcbiLogFields ( const stringsource ) ◆ CompareDiagPostLevel()

Compare two severities.

Returns
The return value is negative if the first value is lower than the second one, positive if it's higher than the second one, 0 if the severities are equal.

Definition at line 6262 of file ncbidiag.cpp.

References eDiag_Trace.

Referenced by AdjustApplogPrintableSeverity(), CException::CException(), CException::GetStackTrace(), IsVisibleDiagPostLevel(), CTeeDiagHandler::Post(), CPythonDiagHandler::Post(), CDiagContextThreadData::RemoveCollectGuard(), CDiagCollectGuard::SetCollectSeverity(), CDiagCollectGuard::SetPrintSeverity(), CException::SetSeverity(), CException::x_GetStackTrace(), CDiagCollectGuard::x_Init(), and CNcbiDiag::x_Put().

◆ ComposeMessage() [1/3] ◆ ComposeMessage() [2/3] ◆ ComposeMessage() [3/3] ◆ COpentelemetryTracer() [1/3] COpentelemetryTracer::COpentelemetryTracer ( const stringendpoint ) ◆ COpentelemetryTracer() [2/3] COpentelemetryTracer::COpentelemetryTracer ( ostream &  ostr )

NOTE: The tracers are global; creating a new tracer replaces any previously installed one.

Export to the output stream. The stream must exist at least until the tracer is deleted.

Definition at line 221 of file opentelemetry_tracer.cpp.

◆ COpentelemetryTracer() [3/3] COpentelemetryTracer::COpentelemetryTracer ( void  )

Export using exporter settings from the environment/INI file.

The default is to use OTLP/HTTP collector at "http://localhost:4318/v1/traces". The available variables (INI file uses OTEL section, e.g. [OTEL]TRACES_EXPORTER=) and supported values are: OTEL_TRACES_EXPORTER = { otlp, console }, default = otlp OTEL_EXPORTER_OTLP_PROTOCOL = { http/protobuf, http/json, grpc }, default = http/protobuf OTEL_EXPORTER_OTLP_ENDPOINT = URL string, default = http://localhost:4318 for http/*, http://localhost:4317 for grpc

Definition at line 227 of file opentelemetry_tracer.cpp.

◆ COpentelemetryTracerSpan() ◆ CPerfLogger() [1/3] ◆ CPerfLogger() [2/3] ◆ CPerfLogger() [3/3] ◆ CPerfLogGuard() [1/3]

Constructor.

Use the provided start and elapsed times to initialize the logger and continue to measure an operation.

Parameters
resource Name of the resource (must be non-empty, else throws an exception). start_time Start time, usually obtained from a previous logger to continue measuring an operation. elapsed_time Elapsed time in seconds obtained from a previous logger. state Whether to start the timer by default.

Definition at line 511 of file perf_log.hpp.

References CTempString::empty(), and NCBI_THROW.

◆ CPerfLogGuard() [2/3]

Constructor.

Parameters
resource Name of the resource (must be non-empty, else throws an exception). state Whether to start the timer by default.

Definition at line 500 of file perf_log.hpp.

References CTempString::empty(), and NCBI_THROW.

◆ CPerfLogGuard() [3/3]

Constructor.

Parameters
resource Name of the resource (must be non-empty, else throws an exception). Constructor. Use the provided stopwatch to track time. stopwatch User-provided stopwatch to use for tracking time. The same stopwatch object can be used multiple times to accumulate total time for several operations. state Whether to start the timer by default.
Note
The stopwatch is not copied, so the original object must not be destroyed while the logger is running.

Definition at line 525 of file perf_log.hpp.

References CTempString::empty(), and NCBI_THROW.

◆ CRequestContext() [1/2] ◆ CRequestContext() [2/2] ◆ CRequestContext_PassThrough() [1/2] CRequestContext_PassThrough::CRequestContext_PassThrough ( CRequestContext  ctx ) inline ◆ CRequestContext_PassThrough() [2/2] CRequestContext_PassThrough::CRequestContext_PassThrough ( void  ) inline ◆ CRequestContextGuard_Base()

Initialize guard.

Parameters
context Request context to be used. If null, re-use current context. flags Optional flags,
See also
FFlags.

Definition at line 933 of file request_ctx.cpp.

References context, ctx, CRequestContextGuard_Base::fPrintRequestStart, GetDiagContext(), CRequestContextGuard_Base::m_Flags, CRequestContextGuard_Base::m_OriginatesFromThrow, CRequestContextGuard_Base::m_RequestContext, CRequestContextGuard_Base::m_SavedContext, and CRef< C, Locker >::Reset().

◆ CSharedHitId() [1/2] ◆ CSharedHitId() [2/2] CSharedHitId::CSharedHitId ( void  ) inline

Definition at line 74 of file request_ctx.hpp.

◆ CStreamDiagHandler()

Constructor.

This does *not* own the stream; users will need to clean it up themselves if appropriate.

Parameters
os Output stream. quick_flush Do stream flush after every message.

Definition at line 6527 of file ncbidiag.cpp.

References CStreamDiagHandler_Base::SetLogName().

◆ CStreamDiagHandler_Base() CStreamDiagHandler_Base::CStreamDiagHandler_Base ( void  ) ◆ CSysLog() [1/2] ◆ CSysLog() [2/2] ◆ DECLARE_CLASS_STATIC_MUTEX() CSysLog::DECLARE_CLASS_STATIC_MUTEX ( sm_Mutex  ) private ◆ DeleteProperty() ◆ Deserialize() ◆ DiagAssert() ◆ DiagAssertIfSuppressedSystemMessageBox() ◆ DiagFatal() ◆ DiagHandler_Reopen() void DiagHandler_Reopen ( void  ) ◆ DiagTrouble()

Display trouble error message.

Definition at line 8045 of file ncbidiag.cpp.

References CNcbiDiag::CNcbiDiag(), eDiag_Fatal, CNcbiDiag::Endm, and info.

Referenced by CConcurrentMap< Key, Value, Comparator, Allocator, CntChildsInNode, MaxTreeHeight, DeletionDelay, DelStoreCapacity >::x_AddNewRoot().

◆ DiagValidate() ◆ DisableDiagPostLevelChange() bool DisableDiagPostLevelChange ( bool  disable_change = true ) ◆ Discard() [1/2] void CPerfLogger::Discard ( void  ) inline ◆ Discard() [2/2] void CPerfLogGuard::Discard ( void  ) inline ◆ DiscardMessages() void CDiagContext::DiscardMessages ( void  ) ◆ Empty() bool CSharedHitId::Empty ( void  ) const inline ◆ EndSpan() [1/3] void CJaegerTracerSpan::EndSpan ( void  ) inlineoverridevirtual ◆ EndSpan() [2/3] void COpentelemetryTracerSpan::EndSpan ( void  ) overridevirtual ◆ EndSpan() [3/3] ◆ Enumerate()

template<class TCallback >

void CRequestContext_PassThrough::Enumerate ( TCallback  callback ) inline ◆ ErrCode() ErrCode::ErrCode ( int  code, int  subcode = 0  ) inline ◆ Extra()

Create a temporary CDiagContext_Extra object.

The object will print arguments automatically from destructor. Can be used like: Extra().Print(name1, val1).Print(name2, val2);

Definition at line 2095 of file ncbidiag.hpp.

References CDiagContext::CDiagContext_Extra, and SDiagMessage::eEvent_Extra.

Referenced by CGRPCRequestLogger::CGRPCRequestLogger(), CWNJobWatcher::CheckForInfiniteLoop(), CCgi2RCgiApp::CheckJob(), CVcfTrack::CheckRange(), CompressAssembly(), ColumnarVcfCache::CreateBlob(), CBlastAligner::GenerateAlignments(), CNcbiLogFields::LogFields(), CNetStorageHandler::OnClose(), CJaegerTracer::OnRequestStart(), COpentelemetryTracer::OnRequestStart(), CPerfLogger::Post(), CDiagContext::PrintStart(), CCgiSampleApplication::ProcessPrintEnvironment(), COperationTiming::Register(), CIgBlast::Run(), CNetScheduleDApp::Run(), CNetStorageDApp::Run(), CNetStorageGCApp::Run(), CAdvancedAlignCleanup::RunSplignOnCompartment(), CSparseGraph::Save(), ColumnarVcfCache::SetInfoFields(), CCgi2RCgiApp::SubmitJob(), UncomressAndCreate(), CNgAligner::x_Align_Impl(), CQueue::x_CancelJobs(), CQueue::x_CheckExecutionTimeout(), CSparseGraph::x_CheckRemoteData(), CQueueDataBase::x_CreateAndMountQueue(), CPubseqGatewayApp::x_DispatchRequest(), CSGAlignStatJob::x_Execute(), CNetStorageHandler::x_GetObject(), CGRPCRequestLogger::x_Init(), CNetScheduleHandler::x_LogCommandWithJob(), CDBConnectionFactory::x_LogConnection(), CDiagContext::x_LogEnvironment(), CRequestContext::x_LogHitID(), CDiagContext::x_LogHitID(), CNcbiApplicationAPI::x_LogOptions(), CQueue::x_LogSubmit(), CHttpConnection::x_MaintainBacklog(), CCgiApplication::x_OnEvent(), CQueueDataBase::x_Open(), CNetStorageGCApp::x_PrintFinishCounters(), CNetScheduleHandler::x_PrintGetJobResponse(), CNetStorageHandler::x_PrintMessageRequestStop(), CNetScheduleHandler::x_ProcessChangeAffinity(), CNetScheduleHandler::x_ProcessClearWorkerNode(), CNetStorageHandler::x_ProcessCreate(), CNetScheduleHandler::x_ProcessGetJob(), CNetScheduleHandler::x_ProcessJobExchange(), CNetScheduleHandler::x_ProcessMsgBatchSubmit(), CNetScheduleHandler::x_ProcessMsgQueue(), CNetScheduleHandler::x_ProcessMsgRequest(), CNetScheduleHandler::x_ProcessReading(), CNetStorageHandler::x_ProcessReconfigure(), CNetScheduleHandler::x_ProcessReloadConfig(), CNetStorageHandler::x_ProcessRelocate(), CNetScheduleHandler::x_ProcessSetAffinity(), CNetScheduleHandler::x_ProcessSetQueue(), CInstancedAligner::x_RunAligner(), CSparseGraph::x_Sync(), and CRequestContext::x_UpdateSubHitID().

◆ Flush() void CDiagContext_Extra::Flush ( void  )

Print the message and reset object.

The object can then be reused to print a new log line (with a new set of arguments if necessary). This is only possible with 'extra' messages, request start/stop messages can not be reused after flush and will print error message instead.

Definition at line 2434 of file ncbidiag.cpp.

References ctx, NStr::DoubleToString(), eDiag_Info, eDiagAppState_AppRun, eDiagAppState_Request, eDiagAppState_RequestBegin, eDiagAppState_RequestEnd, SDiagMessage::eEvent_Extra, SDiagMessage::eEvent_PerfLog, SDiagMessage::eEvent_RequestStart, SDiagMessage::eEvent_RequestStop, SDiagMessage::eEvent_Start, NStr::fDoubleFixed, CNcbiDiag::ForceImportantFlags(), GetDiagBuffer(), GetDiagContext(), CDiagContext::GetRequestContext(), CDiagContext::IsSetOldPostFormat(), kApplogDiagPostFlags, SDiagMessage::m_AllowBadExtraNames, CDiagContext_Extra::m_AllowBadNames, CDiagContext_Extra::m_Args, SDiagMessage::m_Event, CDiagContext_Extra::m_EventType, SDiagMessage::m_ExtraArgs, CDiagContext_Extra::m_Flushed, CDiagContext_Extra::m_PerfStatus, CDiagContext_Extra::m_PerfTime, CDiagContext_Extra::m_Typed, SDiagMessage::m_TypedExtra, NULL, CDiagContext_Extra::PrintNcbiAppInfoOnRequest(), CDiagContext_Extra::PrintNcbiRoleAndLocation(), s_IsDisabledAppLogEvent(), and CDiagContext::x_StartRequest().

Referenced by CGRPCServerCallbacks::BeginRequest(), CNetScheduleServer::Exit(), CStatisticsCounters::PrintServerWide(), CDiagContext::PrintStart(), CQueue::PrintStatistics(), CPubseqGatewayApp::x_CreateRequestContext(), CDiagContext::x_LogEnvironment(), CQueue::x_LogSubmit(), CCgiApplication::x_OnEvent(), CNetScheduleHandler::x_PrintCmdRequestStart(), CNetStorageHandler::x_PrintMessageRequestStart(), and CDiagContext_Extra::x_Release().

◆ FlushMessages() ◆ ForceImportantFlags() ◆ FormatExtraMessage() string SDiagMessage::FormatExtraMessage ( void  ) const ◆ g_Diag_Use_RWLock() void g_Diag_Use_RWLock ( bool  enable = true )

Use RW-lock for synchronization rather than mutex.

NOTE: 1. The function should never be called when there are several threads running. Otherwise the result may be unpredictable. Also, do not call it from any diagnostic framework functions. E.g., it can not be called from CSomeDiagHandler::Post(). The best place to switch is in the very beginning of main(). 2. In many cases switching to RW-lock will not improve the performance. E.g. any stream-based diag handlers including stderr will have to lock a mutex before writing a message anyway. Significant improvement may be seen only when using file handle based handlers which do atomic writes without additional locks. 3. If a custom diag handler is installed, it must take care about synchronization in Post() method. The framework only sets read lock before Post(), so it may be called from multiple threads at the same time. If in doubt, do not turn this on. The returned value is true on success, false if the switching fails for any reason.

Definition at line 88 of file ncbidiag.cpp.

References _ASSERT, _TROUBLE, NCBI_THROW, s_DiagRWLock, and s_DiagUseRWLock.

Referenced by main().

◆ g_DiagUnknownFunction() const char* g_DiagUnknownFunction ( void  ) ◆ Get() ◆ GetAction() EAction CDiagCollectGuard::GetAction ( void  ) const inline ◆ GetAllowedSessionIDFormat() ◆ GetAppName() [1/2] ◆ GetAppName() [2/2] ◆ GetAppState() [1/3] ◆ GetAppState() [2/3]

Return application state for the current thread if it's set.

If not set, return global application state. This is a shortcut to the current request context's GetAppState().

Definition at line 2904 of file ncbidiag.cpp.

References CRequestContext::GetAppState(), and CDiagContext::GetRequestContext().

Referenced by CGRPCRequestLogger::CGRPCRequestLogger(), SDiagMessage::GetAppState(), CDiagContext::GetProperty(), CDiagContext::PrintRequestStart(), CDiagContext::PrintRequestStop(), CSharedHitId::SetHitId(), CDiagContext::x_DiagAtApplicationLevel(), CGRPCRequestLogger::x_Init(), and SDiagMessage::x_SaveContextData().

◆ GetAppState() [3/3] ◆ GetAutoIncRequestIDOnPost() bool CRequestContext::GetAutoIncRequestIDOnPost ( void  ) const inline ◆ GetBadSessionIDAction() ◆ GetBytesRd() Int8 CRequestContext::GetBytesRd ( void  ) const inline ◆ GetBytesWr() Int8 CRequestContext::GetBytesWr ( void  ) const inline ◆ GetClass() [1/2] const string& CDiagCompileInfo::GetClass ( void  ) const ◆ GetClass() [2/2] const char* CNcbiDiag::GetClass ( void  ) const ◆ GetClient() string SDiagMessage::GetClient ( void  ) const ◆ GetClientIP() string CRequestContext::GetClientIP ( void  ) const inline

Client IP/hostname.

Definition at line 754 of file request_ctx.hpp.

References CRequestContext::eProp_ClientIP, CDiagContext::GetDefaultClientIP(), GetDiagContext(), CRequestContext::m_ClientIP, and CRequestContext::x_IsSetProp().

Referenced by CGRPCServerCallbacks::BeginRequest(), g_AppendClientIPAndSessionID(), SDiagMessage::GetClient(), CDiagContext::GetProperty(), SNetStorageRPC::MkStdRequest(), CNCActiveHandler::ProxyGetMeta(), CNCActiveHandler::ProxyGetSize(), CNCActiveHandler::ProxyHasBlob(), CNCActiveHandler::ProxyProlong(), CNCActiveHandler::ProxyRead(), CNCActiveHandler::ProxyReadLast(), CNCActiveHandler::ProxyRemove(), CNCActiveHandler::ProxySetValid(), CNCActiveHandler::ProxyWrite(), s_UpdateVDBRequestContext(), CNCActiveHandler::SearchMeta(), SDiagMessage::x_SaveContextData(), CNCActiveHandler::x_SendCopyPutCmd(), CId2ReaderBase::x_SetContextData(), and CRequestContext::x_UpdateStdPassThroughProp().

◆ GetCollectSeverity() EDiagSev CDiagCollectGuard::GetCollectSeverity ( void  ) const inline ◆ GetCurrentSubHitID() ◆ GetCurrentSubHitId() TSubHitId CSharedHitId::GetCurrentSubHitId ( void  ) const inline ◆ GetDefaultAutoIncRequestIDOnPost() bool CRequestContext::GetDefaultAutoIncRequestIDOnPost ( void  ) static ◆ GetDefaultClientIP() string CDiagContext::GetDefaultClientIP ( void  ) static ◆ GetDefaultHitID() string CDiagContext::GetDefaultHitID ( void  ) const

Get global default hit id.

The hit id may be set using SetDefaultHitId(), HTTP_NCBI_PHID or NCBI_LOG_HIT_ID env. variables, or Log.Http_Hit_Id/Log.Hit_Id values in the INI file. The Http-value has higher priority. If none of the values is set, the default hit id is generated automatically.

Definition at line 1850 of file ncbidiag.cpp.

◆ GetDefaultSessionID() string CDiagContext::GetDefaultSessionID ( void  ) const ◆ GetDescription() ◆ GetDiagContext()

Get diag context instance.

Definition at line 820 of file logging.cpp.

References ctx, CSafeStaticLifeSpan::eLifeSpan_Long, and CSafeStatic< T, Callbacks >::Get().

Referenced by CGRPCClientContext::AddStandardNCBIMetadata(), CNcbiApplicationAPI::AppMain(), CCgiApplication::AppStart(), CNcbiApplicationAPI::AppStart(), CCgiApplication::AppStop(), CNcbiApplicationAPI::AppStop(), CNcbiTestsObserver::assertion_result(), CGRPCServerCallbacks::BeginRequest(), CWNJobWatcher::CheckForInfiniteLoop(), CCgi2RCgiApp::CheckJob(), CVcfTrack::CheckRange(), CNSClientsRegistry::ClearOnTimeout(), CGridCommandLineInterfaceApp::Cmd_Login(), CNcbiApplicationAPI::CNcbiApplicationAPI(), CompressAssembly(), CPSGDataLoader_Impl::CPSGDataLoader_Impl(), ColumnarVcfCache::CreateBlob(), CreateErrorRequestContext(), CRequestContext_PassThrough::CRequestContext_PassThrough(), CRequestContextGuard_Base::CRequestContextGuard_Base(), DismissErrorRequestContext(), CGRPCServerCallbacks::EndRequest(), CRemoteAppLauncher::ExecRemoteApp(), NAutomation::CAutomationProc::ExecSetContext(), SAsyncWriteTask::Execute(), CNetScheduleServer::Exit(), CDiagContext_Extra::Flush(), CNcbiApplicationAPI::FlushDiag(), g_PostPerf(), CBlastAligner::GenerateAlignments(), SDiagMessage::GetAppName(), SDiagMessage::GetAppState(), CRequestContext::GetAppState(), CRequestContext::GetClientIP(), GetDiagRequestId(), CRequestContext::GetEncodedSessionID(), SDiagMessage::GetHost(), SDiagMessage::GetSession(), CRequestContext::GetSessionID(), SDiagMessage::GetUID(), CAsyncWriteCache::GetWriteStream(), SPSG_NcbiPeerID::Init(), SNetScheduleAPIImpl::Init(), CTLibContext::InitApplicationName(), CRequestContext::IsSetClientIP(), CRequestContext::IsSetHitID(), CRequestContext::IsSetSessionID(), CNcbiLogFields::LogFields(), CCgiApplication::LogRequest(), main(), Main(), NcbiSys_main(), CNetScheduleHandler::OnClose(), CNetStorageHandler::OnClose(), CJaegerTracer::OnRequestStart(), COpentelemetryTracer::OnRequestStart(), CPerfLogger::Post(), CStatisticsCounters::PrintServerWide(), CQueue::PrintStatistics(), CGetStatisticsProcessor::Process(), CCgiSampleApplication::ProcessPrintEnvironment(), COperationTiming::Register(), CRequestContextGuard_Base::Release(), CNetStorageGCDatabase::RemoveObject(), CIgBlast::Run(), CCgiApplication::Run(), CPrimeCacheApplication::Run(), CAsnSubCacheCreateApplication::Run(), CNetScheduleDApp::Run(), CNetStorageDApp::Run(), CNetStorageGCApp::Run(), CExec::RunSilent(), CAdvancedAlignCleanup::RunSplignOnCompartment(), s_Daemonize(), s_GetNextLogPrefix(), s_SpawnUnix(), CSparseGraph::Save(), SetDiagHandler(), SetDiagRequestId(), SetDiagUserAndHost(), CSharedHitId::SetHitId(), CRequestContext::SetHitID(), ColumnarVcfCache::SetInfoFields(), CCgiResponse::SetMultipartMode(), CNcbiApplicationAPI::SetProgramDisplayName(), CRequestContext::SetSessionID(), CGridCommandLineInterfaceApp::SetUp_NetStorageCmd(), CDiagContext::SetupDiag(), CExec::Spawn(), CExec::SpawnL(), CExec::SpawnLE(), CExec::SpawnLP(), CExec::SpawnLPE(), CExec::SpawnV(), CExec::SpawnVE(), CExec::SpawnVP(), CExec::SpawnVPE(), CLogLatencyReport::Start(), CCgi2RCgiApp::SubmitJob(), UncomressAndCreate(), CDiagContext::UpdatePID_AsyncSafe(), CCgiResponse::WriteHeader(), CNgAligner::x_Align_Impl(), CQueue::x_CancelJobs(), CQueue::x_CheckExecutionTimeout(), CSparseGraph::x_CheckRemoteData(), CQueueDataBase::x_CreateAndMountQueue(), CNetScheduleHandler::x_CreateConnContext(), CNetStorageHandler::x_CreateConnContext(), CPubseqGatewayApp::x_CreateRequestContext(), CPubseqGatewayApp::x_DispatchRequest(), CGetJobNotificationThread::x_DoJob(), CJobQueueCleanerThread::x_DoJob(), CJobQueueExecutionWatcherThread::x_DoJob(), CSGAlignStatJob::x_Execute(), CNetStorageHandler::x_GetConnRef(), CNetScheduleHandler::x_GetConnRef(), CRequestContext::x_GetHitID(), CNetStorageHandler::x_GetObject(), CException::x_Init(), SDiagMessage::x_InitData(), CCgiContext::x_InitSession(), SDiagMessage::x_IsSetOldFormat(), CNetScheduleHandler::x_LogCommandWithJob(), CDBConnectionFactory::x_LogConnection(), CDiagContext::x_LogEnvironment(), CRequestContext::x_LogHitID(), CNcbiApplicationAPI::x_LogOptions(), CQueue::x_LogSubmit(), CHttpConnection::x_MaintainBacklog(), SPSG_UserArgsBuilder::x_MergeOthers(), SDiagMessage::x_NewWrite(), CCgiApplication::x_OnEvent(), CQueueDataBase::x_Open(), CNetScheduleHandler::x_PrintCmdRequestStart(), CNetScheduleHandler::x_PrintCmdRequestStop(), CNetStorageGCApp::x_PrintFinishCounters(), CNetScheduleHandler::x_PrintGetJobResponse(), CNetStorageHandler::x_PrintMessageRequestStart(), CNetStorageHandler::x_PrintMessageRequestStop(), SWorkerNodeJobContextImpl::x_PrintRequestStop(), CPubseqGatewayApp::x_PrintRequestStop(), CPSGS_Dispatcher::x_PrintRequestStop(), CNetScheduleHandler::x_ProcessChangeAffinity(), CNetScheduleHandler::x_ProcessClearWorkerNode(), CNetStorageHandler::x_ProcessCreate(), CNetScheduleHandler::x_ProcessGetJob(), CNetScheduleHandler::x_ProcessJobExchange(), CNetScheduleHandler::x_ProcessMsgBatchSubmit(), CNetScheduleHandler::x_ProcessMsgQueue(), CNetScheduleHandler::x_ProcessMsgRequest(), CNetScheduleHandler::x_ProcessReading(), CNetStorageHandler::x_ProcessReconfigure(), CNetScheduleHandler::x_ProcessReloadConfig(), CNetStorageHandler::x_ProcessRelocate(), CNetScheduleHandler::x_ProcessSetAffinity(), CNetScheduleHandler::x_ProcessSetQueue(), CFastCgiApplicationMT::x_ProcessThreadedRequest(), CNetStorageGCApp::x_RemoveObjects(), CInstancedAligner::x_RunAligner(), CFastCgiApplicationMT::x_RunFastCGI(), SWorkerNodeJobContextImpl::x_RunJob(), SOfflineJobContextImpl::x_RunJob(), SDiagMessage::x_SaveContextData(), CId2ReaderBase::x_SetContextData(), CSparseGraph::x_Sync(), CNcbiApplicationAPI::x_TryMain(), CRequestContext::x_UpdateSubHitID(), and CRequestContextGuard_Base::~CRequestContextGuard_Base().

◆ GetDiagDieLevel() ◆ GetDiagErrCodeInfo() ◆ GetDiagFilter() ◆ GetDiagHandler()

Get the currently set diagnostic handler class.

Definition at line 6434 of file ncbidiag.cpp.

References _ASSERT, and CDiagLock::eRead.

Referenced by CNcbiApplicationAPI::AppMain(), CWindowsCmdErrorHandler::CWindowsCmdErrorHandler(), CwxLogDiagHandler::CwxLogDiagHandler(), DiagHandler_Reopen(), CNcbiApplicationAPI::FlushDiag(), GetDiagStream(), GetLogFile(), init_common(), CAsyncDiagHandler::InstallToDiag(), CDiagContextThreadData::RemoveCollectGuard(), CAsyncDiagHandler::RemoveFromDiag(), SetDiagNode(), SetLogFile(), python::SetLogger(), CDiagContext::SetupDiag(), and CNcbiApplicationAPI::x_HonorStandardSettings().

◆ GetDiagPostLevel() ◆ GetDiagRequestId() Uint8 GetDiagRequestId ( void  ) ◆ GetDiagStream() ◆ GetDiagTrace() bool GetDiagTrace ( void  ) ◆ GetDisabledAppLog() [1/2] bool CDiagContext::GetDisabledAppLog ( void  ) static

Get flag disabling applog events (set by DIAG_DISABLE_APPLOG_MESSAGES variable).

Definition at line 447 of file ncbidiag.cpp.

References s_DisableAppLog.

◆ GetDisabledAppLog() [2/2] bool CRequestContext::GetDisabledAppLog ( void  ) const inline ◆ GetDisabledAppLogEvents() [1/2] ◆ GetDisabledAppLogEvents() [2/2] ◆ GetDtab() ◆ GetElapsedTime() double CPerfLogger::GetElapsedTime ( void  ) const inline ◆ GetEncodedAppName() const string & CDiagContext::GetEncodedAppName ( void  ) const ◆ GetEncodedHost() const string & CDiagContext::GetEncodedHost ( void  ) const ◆ GetEncodedHostname() const string & CDiagContext::GetEncodedHostname ( void  ) const ◆ GetEncodedSessionID() [1/2] string CDiagContext::GetEncodedSessionID ( void  ) const ◆ GetEncodedSessionID() [2/2] string CRequestContext::GetEncodedSessionID ( void  ) const inline ◆ GetErrCodeString() const char * CRequestContextException::GetErrCodeString ( void  ) const overridevirtual ◆ GetErrorCode() int CNcbiDiag::GetErrorCode ( void  ) const

Get error code of the current message.

◆ GetErrorSubCode() int CNcbiDiag::GetErrorSubCode ( void  ) const

Get error subcode of the current message.

◆ GetEventName() ◆ GetExitCode() int CDiagContext::GetExitCode ( void  ) const inline ◆ GetExitSignal() int CDiagContext::GetExitSignal ( void  ) const inline ◆ GetFastCGIIteration() Uint8 GetFastCGIIteration ( void  ) inline ◆ GetFile() [1/2] const char* CDiagCompileInfo::GetFile ( void  ) const ◆ GetFile() [2/2] const char* CNcbiDiag::GetFile ( void  ) const ◆ GetFunction() [1/2] const string& CDiagCompileInfo::GetFunction ( void  ) const ◆ GetFunction() [2/2] const char* CNcbiDiag::GetFunction ( void  ) const ◆ GetGlobalAppState() ◆ GetGlobalRequestId() string CDiagContext::GetGlobalRequestId ( void  ) const inline ◆ GetHitId() ◆ GetHitID() string CRequestContext::GetHitID ( void  ) const inline ◆ GetHost() [1/2] ◆ GetHost() [2/2] ◆ GetHostIP() ◆ GetHostLocation() ◆ GetHostname() const string & CDiagContext::GetHostname ( void  ) const ◆ GetHostRole() ◆ GetLine() [1/2] int CDiagCompileInfo::GetLine ( void  ) const ◆ GetLine() [2/2] size_t CNcbiDiag::GetLine ( void  ) const ◆ GetLogFile() [1/3] ◆ GetLogFile() [2/3]

Get current log file name.

If file_type is eDiagFile_All, always returns empty string.

Definition at line 7080 of file ncbidiag.cpp.

References eDiagFile_All, eDiagFile_Err, eDiagFile_Log, eDiagFile_Perf, eDiagFile_Trace, file_type, CStreamDiagHandler_Base::GetLogName(), kEmptyStr, CFileDiagHandler::m_Err, CFileDiagHandler::m_Log, CFileDiagHandler::m_Perf, and CFileDiagHandler::m_Trace.

Referenced by GetLogFile().

◆ GetLogFile() [3/3] ◆ GetLogger() ◆ GetLoggerStartTime() const CTime& CPerfLogger::GetLoggerStartTime ( void  ) const inline ◆ GetLogName() [1/4] string CDiagHandler::GetLogName ( void  ) virtual ◆ GetLogName() [2/4] string CStreamDiagHandler_Base::GetLogName ( void  ) virtual ◆ GetLogName() [3/4] string CAsyncDiagHandler::GetLogName ( void  ) virtual ◆ GetLogName() [4/4] string CSysLog::GetLogName ( void  ) inlinevirtual ◆ GetLogRate_Limit() ◆ GetLogRate_Period() ◆ GetLogStream() ◆ GetLogTruncate() bool CDiagContext::GetLogTruncate ( void  ) static ◆ GetModule() [1/2] const char* CDiagCompileInfo::GetModule ( void  ) const ◆ GetModule() [2/2] const char* CNcbiDiag::GetModule ( void  ) const ◆ GetNextHitID() string CDiagContext::GetNextHitID ( void  ) const ◆ GetNextRequestID() ◆ GetNextSubHitID() ◆ GetNextSubHitId() TSubHitId CSharedHitId::GetNextSubHitId ( void  ) inline ◆ GetOmitStackTrace() bool CNcbiDiag::GetOmitStackTrace ( void  ) const inline ◆ GetPID()

Get cached PID (read real PID if not cached yet).

Definition at line 1628 of file ncbidiag.cpp.

References CCurrentProcess::GetPid(), and CDiagContext::sm_PID.

Referenced by CGridCommandLineInterfaceApp::Cmd_Login(), SNetScheduleAPIImpl::Init(), CPubseqGatewayApp::OnInfo(), CJaegerTracer::OnRequestStart(), COpentelemetryTracer::OnRequestStart(), CFileHandleDiagHandler::Reopen(), SGridWorkerNodeImpl::Run(), s_CreateUID(), SDiagMessage::SDiagMessage(), CDiagContext::x_CreateUID_AsyncSafe(), CNetScheduleHandler::x_ProcessHealth(), CNetStorageHandler::x_ProcessInfo(), CNetScheduleHandler::x_ProcessVersion(), CNetScheduleDApp::x_WritePid(), and CNetStorageDApp::x_WritePid().

◆ GetPostFlags()

Get post flags for the current message.

If the post flags have "eDPF_Default" set, then in the returned flags it will be reset and substituted by current default flags.

Referenced by SThreadsInSTBuild::Report(), and CNcbiDiag::x_Put().

◆ GetPrintSeverity() EDiagSev CDiagCollectGuard::GetPrintSeverity ( void  ) const inline ◆ GetProcessPostNumber() ◆ GetProperties() [1/2] ◆ GetProperties() [2/2] ◆ GetProperty() [1/2] ◆ GetProperty() [2/2]

Get application context property by name, return empty string if the property is not set.

If mode is eProp_Default and the property is not a known one, check thread-local properties first.

Deprecated:

Definition at line 2120 of file ncbidiag.cpp.

References CStopWatch::AsString(), map_checker< Container >::end(), CDiagLock::eRead, map_checker< Container >::find(), CDiagContext::GetAppName(), CDiagContext::GetAppState(), CRequestContext::GetClientIP(), CDiagContext::GetHostIP(), CDiagContext::GetHostname(), CDiagContext::GetRequestContext(), CRequestContext::GetRequestTimer(), CDiagContext::GetSessionID(), CDiagContext::GetUsername(), NStr::Int8ToString(), NStr::IntToString(), CRequestContext::IsSetRequestStatus(), kEmptyStr, CDiagContext::kProperty_AppName, CDiagContext::kProperty_AppState, CDiagContext::kProperty_BytesRd, CDiagContext::kProperty_BytesWr, CDiagContext::kProperty_ClientIP, CDiagContext::kProperty_ExitCode, CDiagContext::kProperty_ExitSig, CDiagContext::kProperty_HostIP, CDiagContext::kProperty_HostName, CDiagContext::kProperty_ReqStatus, CDiagContext::kProperty_ReqTime, CDiagContext::kProperty_SessionID, CDiagContext::kProperty_UserName, CDiagContext::m_ExitCode, CDiagContext::m_ExitSig, CDiagContext::m_Properties, and s_AppStateToStr().

◆ GetReadOnly() bool CRequestContext::GetReadOnly ( void  ) const inline ◆ GetRef() ◆ GetRequestContext() [1/2] CRequestContext& CRequestContextGuard_Base::GetRequestContext ( void  ) const inline ◆ GetRequestContext() [2/2]

Shortcut to CDiagContextThreadData::GetThreadData().GetRequestContext()

Definition at line 2003 of file ncbidiag.cpp.

References CDiagContextThreadData::GetRequestContext(), and CDiagContextThreadData::GetThreadData().

Referenced by CGRPCClientContext::AddStandardNCBIMetadata(), SNetScheduleSubmitterImpl::AppendClientIPSessionIDHitID(), SNetCacheAPIImpl::AppendClientIPSessionIDHitID(), SNetCacheAPIImpl::AppendClientIPSessionIDPasswordAgeHitID(), CNcbiTestsObserver::assertion_result(), SNSCommandArguments::AssignValues(), CGRPCServerCallbacks::BeginRequest(), NAutomation::CAutomationProc::ExecSetContext(), CDiagContext_Extra::Flush(), g_AppendClientIPSessionIDHitID(), g_PostPerf(), CDiagContext::GetAppState(), SDiagMessage::GetClient(), CPSG_Request::GetCtx(), GetDiagRequestId(), CDiagContext::GetProperty(), CDiagContext::GetSessionID(), CAsyncWriteCache::GetWriteStream(), SErrorEmulatorParameter::IsActive(), main(), SNetStorageRPC::MkStdRequest(), CCgiRequestProcessor::OnException(), COpentelemetryTracer::OnRequestStart(), CHTMLPageStat::PrintBegin(), CDiagContext::PrintStop(), CCgiApplication::ProcessHttpReferer(), SPSG_IoSession::ProcessRequest(), CCgiContext::RetrieveTrackingId(), SGridWorkerNodeImpl::Run(), CThread::Run(), CPrimeCacheApplication::Run(), CAsnSubCacheCreateApplication::Run(), CPhidIdGenerator::s_GenerateSpanId(), CPhidIdGenerator::s_GetBaseHitId(), s_GetNextLogPrefix(), CPhidIdGenerator::s_GetParentHitId(), s_GetReferer(), s_GetRequestDTab(), s_GetRequestID(), s_UpdateVDBRequestContext(), CGraphCache< TData >::SaveData(), CDiagContext::SetAppState(), SetDiagRequestId(), CCgiApplication::SetHTTPStatus(), CCgiRequestProcessor::SetHTTPStatus(), CDiagContext::SetProperty(), CPSGS_Request::SetRequestContext(), SetSessionAndIPAndPHID(), CCgiResponse::SetStatus(), CNetCacheAdmin::ShutdownServer(), SInteractiveNewRequestStart::SInteractiveNewRequestStart(), CCgiResponse::WriteHeader(), CCgiRequest::x_InitRequestContext(), CCgiContext::x_InitSession(), CNetScheduleHandler::x_LogCommandWithJob(), CNetScheduleHandler::x_OnCmdParserError(), CCgiApplication::x_OnEvent(), CNetScheduleHandler::x_PrintCmdRequestStart(), CDiagContext::x_PrintMessage(), CPSGS_Dispatcher::x_PrintRequestStop(), CNetScheduleHandler::x_ProcessMsgBatchSubmit(), CFastCgiApplicationMT::x_ProcessThreadedRequest(), CNetStorageGCApp::x_RemoveObjects(), SDiagMessage::x_SaveContextData(), CCgiRequest::x_SetClientIpProperty(), CId2ReaderBase::x_SetContextData(), CDiagContext::x_StartRequest(), and CNcbiApplicationAPI::x_TryMain().

◆ GetRequestID()

Get request ID (or zero if not set).

Definition at line 715 of file request_ctx.hpp.

References CRequestContext::eProp_RequestID, CRequestContext::m_RequestID, and CRequestContext::x_IsSetProp().

Referenced by GetDiagRequestId(), CDiagContextThreadData::GetRequestId(), SErrorEmulatorParameter::IsActive(), s_CreateDiagRequest(), s_GetNextLogPrefix(), SDiagMessage::SDiagMessage(), CRequestContext::SetSessionID(), CNetStorageHandler::x_GetConnRef(), CNetScheduleHandler::x_GetConnRef(), CDiagContext::x_GetNextHitID(), and CNetScheduleHandler::x_ProcessMsgBatchSubmit().

◆ GetRequestStatus() int CRequestContext::GetRequestStatus ( void  ) const inline ◆ GetRequestTimer() [1/2] CStopWatch& CRequestContext::GetRequestTimer ( void  ) inline ◆ GetRequestTimer() [2/2] ◆ GetSession() string SDiagMessage::GetSession ( void  ) const ◆ GetSessionID() [1/2] string CDiagContext::GetSessionID ( void  ) const ◆ GetSessionID() [2/2] string CRequestContext::GetSessionID ( void  ) const inline

Session ID.

Definition at line 784 of file request_ctx.hpp.

References CRequestContext::eProp_SessionID, CDiagContext::GetDefaultSessionID(), GetDiagContext(), CEncodedString::GetOriginalString(), CRequestContext::m_SessionID, CRequestContext::SetSessionID(), and CRequestContext::x_IsSetProp().

Referenced by CGRPCClientContext::AddStandardNCBIMetadata(), g_AppendClientIPAndSessionID(), CDiagContext::GetSessionID(), SNetStorageRPC::MkStdRequest(), CNCActiveHandler::ProxyGetMeta(), CNCActiveHandler::ProxyGetSize(), CNCActiveHandler::ProxyHasBlob(), CNCActiveHandler::ProxyProlong(), CNCActiveHandler::ProxyRead(), CNCActiveHandler::ProxyReadLast(), CNCActiveHandler::ProxyRemove(), CNCActiveHandler::ProxySetValid(), CNCActiveHandler::ProxyWrite(), CCgiContext::RetrieveTrackingId(), s_GetRequestID(), s_UpdateVDBRequestContext(), CNCActiveHandler::SearchMeta(), CNCActiveHandler::x_SendCopyPutCmd(), CId2ReaderBase::x_SetContextData(), and CRequestContext::x_UpdateStdPassThroughProp().

◆ GetSeverity() EDiagSev CNcbiDiag::GetSeverity ( void  ) const ◆ GetSeverityCap() EDiagSev CDiagCollectGuard::GetSeverityCap ( void  ) const inline ◆ GetSpan() [1/2] jaegertracing::Span& CJaegerTracerSpan::GetSpan ( void  ) inline ◆ GetSpan() [2/2] TSpan& COpentelemetryTracerSpan::GetSpan ( void  ) inline ◆ GetSplitLogFile() bool GetSplitLogFile ( void  ) ◆ GetSrcTraceParent() const string& CRequestContext::GetSrcTraceParent ( void  ) const inline ◆ GetSrcTraceState() const string& CRequestContext::GetSrcTraceState ( void  ) const inline

The getters provide access to the incoming values (unlike GetTraceState and GetTraceParent which return the new values to be used for outgoing connections).

The getters are expected to be used mostly by tracer and span classes.

Definition at line 457 of file request_ctx.hpp.

References CRequestContext::m_TraceState.

◆ GetStartingPoint() Uint8 CDiagCollectGuard::GetStartingPoint ( void  ) const inline ◆ GetStdStatusMessage() string CRequestStatus::GetStdStatusMessage ( ECode  code ) static

Definition at line 45 of file request_status.cpp.

References CRequestStatus::e100_Continue, CRequestStatus::e101_SwitchingProtocols, CRequestStatus::e200_Ok, CRequestStatus::e201_Created, CRequestStatus::e202_Accepted, CRequestStatus::e203_NonAuthInformation, CRequestStatus::e204_NoContent, CRequestStatus::e205_ResetContent, CRequestStatus::e206_PartialContent, CRequestStatus::e299_PartialContentBrokenConnection, CRequestStatus::e300_MultipleChoices, CRequestStatus::e301_MovedPermanently, CRequestStatus::e302_Found, CRequestStatus::e303_SeeOther, CRequestStatus::e304_NotModified, CRequestStatus::e305_UseProxy, CRequestStatus::e307_TemporaryRedirect, CRequestStatus::e400_BadRequest, CRequestStatus::e401_Unauthorized, CRequestStatus::e402_PaymentRequired, CRequestStatus::e403_Forbidden, CRequestStatus::e404_NotFound, CRequestStatus::e405_MethodNotAllowed, CRequestStatus::e406_NotAcceptable, CRequestStatus::e407_ProxyAuthRequired, CRequestStatus::e408_RequestTimeout, CRequestStatus::e409_Conflict, CRequestStatus::e410_Gone, CRequestStatus::e411_LengthRequired, CRequestStatus::e412_PreconditionFailed, CRequestStatus::e413_RequestEntityTooLarge, CRequestStatus::e414_RequestURITooLong, CRequestStatus::e415_UnsupportedMediaType, CRequestStatus::e416_RangeNotSatisfiable, CRequestStatus::e417_ExpectationFailed, CRequestStatus::e422_UnprocessableEntity, CRequestStatus::e429_Too_Many_Requests, CRequestStatus::e451_Unavailable_For_Legal_Reasons, CRequestStatus::e499_BrokenConnection, CRequestStatus::e500_InternalServerError, CRequestStatus::e501_NotImplemented, CRequestStatus::e502_BadGateway, CRequestStatus::e503_ServiceUnavailable, CRequestStatus::e504_GatewayTimeout, and CRequestStatus::e505_HTTPVerNotSupported.

Referenced by g_AsGRPCStatus(), CCgiException::GetStdStatusMessage(), and SPSG_IoSession::OnHeader().

◆ GetStream() [1/2] virtual CNcbiOstream* CStreamDiagHandler_Base::GetStream ( void  ) inlinevirtual ◆ GetStream() [2/2] virtual CNcbiOstream* CStreamDiagHandler::GetStream ( void  ) inlinevirtual ◆ GetStringUID() [1/3] void CDiagContext::GetStringUID ( TUID  uid, char *  buf  ) const ◆ GetStringUID() [2/3] void CDiagContext::GetStringUID ( TUID  uid, char *  buf, size_t  buf_len  ) const

Fill buffer with string representation of UID.

The buffer size must be at least 17 bytes.

Definition at line 1778 of file ncbidiag.cpp.

References _ASSERT, buf, and int.

◆ GetStringUID() [3/3] string CDiagContext::GetStringUID ( TUID  uid = 0 ) const

Return string representation of UID.

If the argument UID is 0, use the one from the diag context.

Definition at line 1793 of file ncbidiag.cpp.

References buf, CDiagContext::GetUID(), and string.

Referenced by CPSGDataLoader_Impl::CPSGDataLoader_Impl(), CDiagContext::GetStringUID(), SPSG_NcbiPeerID::Init(), SNetScheduleAPIImpl::Init(), CJaegerTracer::OnRequestStart(), COpentelemetryTracer::OnRequestStart(), CCgiResponse::SetMultipartMode(), CDiagContext::WriteStdPrefix(), CNetStorageHandler::x_GetConnRef(), CNetScheduleHandler::x_GetConnRef(), and SPSG_UserArgsBuilder::x_MergeOthers().

◆ GetThreadPostNumber() ◆ GetTID() ◆ GetTime() CTime SDiagMessage::GetTime ( void  ) const ◆ GetTraceParent() [1/4] const string CRequestContext::GetTraceParent ( void  ) const inline ◆ GetTraceParent() [2/4] ◆ GetTraceParent() [3/4] const string& CJaegerTracerSpan::GetTraceParent ( void  ) const inlineoverridevirtual ◆ GetTraceParent() [4/4] const string & COpentelemetryTracerSpan::GetTraceParent ( void  ) const overridevirtual ◆ GetTracerSpan() shared_ptr<ITracerSpan> CRequestContext::GetTracerSpan ( void  ) const inline ◆ GetTracerSpanKind() ◆ GetTraceState() [1/4] const string CRequestContext::GetTraceState ( void  ) const inline ◆ GetTraceState() [2/4] ◆ GetTraceState() [3/4] const string& CJaegerTracerSpan::GetTraceState ( void  ) const inlineoverridevirtual ◆ GetTraceState() [4/4] const string & COpentelemetryTracerSpan::GetTraceState ( void  ) const overridevirtual ◆ GetUID() [1/2] ◆ GetUID() [2/2] ◆ GetUsername() const string & CDiagContext::GetUsername ( void  ) const ◆ GetVersion() TVersion CRequestContext::GetVersion ( void  ) const inline ◆ HaveDescription()

Check if error description exists.

Return TRUE if description for specified error code exists, otherwise return FALSE.

◆ HonorRegistrySettings()

Definition at line 252 of file syslog.cpp.

References CSysLog::eAuth, CSysLog::eAuthPriv, CSysLog::eDaemon, CSysLog::eDefaultFacility, CSysLog::eFTP, CSysLog::eLocal0, CSysLog::eMail, NStr::eNocase, NStr::EqualNocase(), CSysLog::eUser, CSysLog::fNoOverride, IRegistry::Get(), CNcbiApplicationAPI::GetConfig(), CNcbiApplication::Instance(), CSysLog::m_DefaultFacility, CSysLog::m_Flags, NULL, CSysLog::sm_Current, and NStr::StartsWith().

Referenced by CNcbiApplicationAPI::x_HonorStandardSettings().

◆ IgnoreDiagDieLevel()

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 6322 of file ncbidiag.cpp.

References CDiagLock::eWrite.

◆ InitMessages() void CDiagContext::InitMessages ( size_t  max_size = 100 ) ◆ InstallToDiag() void CAsyncDiagHandler::InstallToDiag ( void  ) ◆ IsApplogSeverityLocked() static bool CDiagContext::IsApplogSeverityLocked ( void  ) inlinestatic ◆ IsCollectingMessages() bool CDiagContext::IsCollectingMessages ( void  ) const inline ◆ IsDiagStream() ◆ IsMainThreadDataInitialized() bool CDiagContext::IsMainThreadDataInitialized ( void  ) static ◆ IsON() bool CPerfLogger::IsON ( void  ) static

Is performance logging on, globally? Controlled by CParam(section="Log", entry="PerfLogging", default=false)

Definition at line 58 of file perf_log.cpp.

Referenced by CLogPerformance::CLogPerformance(), g_DoErasePerfLogging(), g_DoPerfLogging(), CPerfLogger::Post(), CPerfLogGuard::Post(), CPerfLogger::Start(), CPerfLogger::Suspend(), and CPerfLogger::~CPerfLogger().

◆ IsRequestLevel() bool CSharedHitId::IsRequestLevel ( void  ) const inline ◆ IsRunning() bool CRequestContext::IsRunning ( void  ) const inlineprivate ◆ IsSet() ◆ IsSetBytesRd() bool CRequestContext::IsSetBytesRd ( void  ) const inline ◆ IsSetBytesWr() bool CRequestContext::IsSetBytesWr ( void  ) const inline ◆ IsSetClientIP() bool CRequestContext::IsSetClientIP ( void  ) const inline ◆ IsSetDiagErrCodeInfo() bool IsSetDiagErrCodeInfo ( ) ◆ IsSetDiagHandler() bool IsSetDiagHandler ( void  ) ◆ IsSetDiagPostFlag() ◆ IsSetDtab() bool CRequestContext::IsSetDtab ( void  ) const inline ◆ IsSetExitCode() bool CDiagContext::IsSetExitCode ( void  ) const inline ◆ IsSetExplicitClientIP() bool CRequestContext::IsSetExplicitClientIP ( void  ) const inline ◆ IsSetExplicitHitID() bool CRequestContext::IsSetExplicitHitID ( void  ) const inline ◆ IsSetExplicitSessionID() bool CRequestContext::IsSetExplicitSessionID ( void  ) const inline ◆ IsSetHitID()

Check if there's an explicit hit id or the default one.

Parameters
src Allowed source(s) of hit id.
Returns
If 'src' is eHitID_Any, always return 'true' because GetHitID always returns a non-empty value. For other options return true if the selected hit id source is already not empty.

Definition at line 826 of file request_ctx.hpp.

References CRequestContext::eHitID_Any, CRequestContext::eHitID_Default, CRequestContext::eHitID_Request, CRequestContext::eProp_HitID, GetDiagContext(), CSharedHitId::IsRequestLevel(), CRequestContext::m_HitID, and CRequestContext::x_IsSetProp().

Referenced by g_PostPerf(), CRequestContext::IsSetExplicitHitID(), s_UpdateVDBRequestContext(), CCgiRequest::x_InitRequestContext(), CId2ReaderBase::x_SetContextData(), CRequestContext::x_UpdateStdPassThroughProp(), and CRequestContext::x_UpdateSubHitID().

◆ IsSetOldPostFormat() bool CDiagContext::IsSetOldPostFormat ( void  ) static ◆ IsSetProperty() ◆ IsSetRequestID() bool CRequestContext::IsSetRequestID ( void  ) const inline ◆ IsSetRequestStatus() bool CRequestContext::IsSetRequestStatus ( void  ) const inline ◆ IsSetSessionID() bool CRequestContext::IsSetSessionID ( void  ) const inline ◆ IsShared() bool CSharedHitId::IsShared ( void  ) const inline ◆ IsUsingRootLog() bool CDiagContext::IsUsingRootLog ( void  ) static ◆ IsUsingSystemThreadId() bool CDiagContext::IsUsingSystemThreadId ( void  ) static ◆ IsValidSessionID()

Check if session id fits the allowed format.

Definition at line 500 of file request_ctx.cpp.

References NStr::EndsWith(), CRequestContext::eSID_Ncbi, CRequestContext::eSID_Other, CRequestContext::eSID_Standard, NStr::fConvErr_NoThrow, CRequestContext::GetAllowedSessionIDFormat(), isalnum(), ITERATE, kAllowedIdMarkchars, NPOS, NStr::StringToUInt(), and NStr::StringToUInt8().

Referenced by CRequestContext::SetSessionID().

◆ IsVisibleDiagPostLevel() ◆ LogFields()

template<class TEntries >

void CNcbiLogFields::LogFields ( const TEntries &  entries ) const inline ◆ MDiagClass() MDiagClass::MDiagClass ( const char *  nclass ) ◆ MDiagFunction() MDiagFunction::MDiagFunction ( const char *  function ) ◆ MDiagModule() MDiagModule::MDiagModule ( const char *  module ) ◆ NCBI_EXCEPTION_DEFAULT() ◆ NcbiLog_AppGetHitID() char* NcbiLog_AppGetHitID ( void  )

Get hit ID (HID, a.k.a.

PHID) for the whole application.

Returns
Attention
This function should be called after NcbiLog_AppRun().
The caller is responsible for freeing the returned string! Use free() or NcbiLog_FreeMemory().
See also
NcbiLog_AppSetHitID, NcbiLog_AppRun

Definition at line 3114 of file ncbi_c_log.c.

References eNcbiLog_AppBegin, eNcbiLog_NotSet, MT_LOCK_API, MT_UNLOCK, NULL, SInfo_tag::phid, s_StrDup(), SInfo_tag::state, sx_Info, and TROUBLE_MSG.

◆ NcbiLog_AppGetSession() char* NcbiLog_AppGetSession ( void  )

Get session ID (SID) for the whole application.

Returns
Attention
This function should be called after NcbiLog_AppRun().
The caller is responsible for freeing the returned string! Use free() or NcbiLog_FreeMemory().
See also
NcbiLog_AppSetSession, NcbiLog_AppStart, NcbiLog_FreeMemory

Definition at line 2968 of file ncbi_c_log.c.

References eNcbiLog_AppBegin, eNcbiLog_NotSet, MT_LOCK_API, MT_UNLOCK, NULL, s_StrDup(), SInfo_tag::session, SInfo_tag::state, sx_Info, and TROUBLE_MSG.

◆ NcbiLog_AppNewHitID() void NcbiLog_AppNewHitID ( void  ) ◆ NcbiLog_AppNewSession() void NcbiLog_AppNewSession ( void  ) ◆ NcbiLog_AppRun() void NcbiLog_AppRun ( void  )

Should be called after the application is initialized and before its main part.

It changes the application state shown in the log to 'P' and log app-wide extra information, if any.

See also
NcbiLog_AppStart, NcbiLog_AppStop

Definition at line 3367 of file ncbi_c_log.c.

References CHECK_APP_START, ctx, eNcbiLog_AppRun, SInfo_tag::host_location, SInfo_tag::host_role, i, SNcbiLog_Param::key, MT_LOCK_API, MT_UNLOCK, NcbiLog_GetHostLocation(), NcbiLog_GetHostRole(), NULL, SInfo_tag::phid, SInfo_tag::remote_logging, s_AddParamsPair(), s_Extra(), s_GetContext(), s_SetState(), sx_Info, SNcbiLog_Param::value, and VERIFY.

Referenced by main(), and CNcbiApplogApp::Run().

◆ NcbiLog_AppSetClient() void NcbiLog_AppSetClient ( const char *  client )

Set client for the whole application.

This setting is effective in between requests, and for the requests for which the client was not explicitly set (by calling NcbiLog_SetClient()).

By default, this value is taken from the environment variables. If that is not populated, it is set to 'UNK_CLIENT'.

Parameters
client New client name (IP address). It will be set to 'UNK_CLIENT' if parameter is NULL or empty string.
See also
NcbiLog_SetClient

Definition at line 2941 of file ncbi_c_log.c.

References client, SInfo_tag::client, MT_LOCK_API, MT_UNLOCK, s_SetClient(), and sx_Info.

◆ NcbiLog_AppSetHitID() void NcbiLog_AppSetHitID ( const char *  hit_id )

Set hit ID (HID, a.k.a.

PHID) for the whole application.

This setting is effective in between of requests, and for the requests for which the (P)HID was not explicitly set by calling NcbiLog_SetHitID().

By default, (P)HID is taken from the HTTP_NCBI_PHID environment variable; if that is not set, then from NCBI_LOG_HIT_ID environment variable; if that is not set also – not used at all until any of *SetHitID() calls.

Attention
This function should be called before NcbiLog_AppRun(), because if PHID is not set on application level or in the environment, then new PHID will be generated on NcbiLog_AppRun().
Parameters
hit_id New (P)HID. (It will be URL-encoded.) (P)HID will be unset if the parameter is NULL or point to empty string, and PHID has not been logged yet.
See also
NcbiLog_AppRun, NcbiLog_SetHitID, NcbiLog_AppGetHitID, NcbiLog_GetNextSubHitID

Definition at line 3064 of file ncbi_c_log.c.

References eNcbiLog_AppBegin, eNcbiLog_NotSet, MT_LOCK_API, MT_UNLOCK, SInfo_tag::phid, SInfo_tag::phid_inherit, s_SetHitID(), SInfo_tag::state, sx_Info, and TROUBLE_MSG.

◆ NcbiLog_AppSetSession() void NcbiLog_AppSetSession ( const char *  session )

Set session ID (SID) for the whole application.

This setting is effective in between requests, and for the requests for which the client was not explicitly set (by calling either NcbiLog_SetSession() or NcbiLog_NewSession()).

By default, SID is taken from the HTTP_NCBI_SID environment variable; if that is not set, then – from NCBI_LOG_SESSION_ID environment variable; if that is not set, then – SID is set to 'UNK_SESSION'.

Parameters
session New session ID. (It will be URL-encoded.) It will be set to 'UNK_SESSION' if the parameter is NULL or empty string.
See also
NcbiLog_AppNewSession, NcbiLog_SetSession, NcbiLog_NewSession

Definition at line 2960 of file ncbi_c_log.c.

References MT_LOCK_API, MT_UNLOCK, s_SetSession(), SInfo_tag::session, and sx_Info.

Referenced by CNcbiApplogApp::SetInfo().

◆ NcbiLog_AppStart() void NcbiLog_AppStart ( const char *  argv[] )

Should be called as soon as possible during application initialization.

Writes the 'start' line to the <appname>.log, including the command line. Calling this function early ensures that the start time of the application is recorded; that data is later used by NcbiLog_AppStop() to calculate the application runtime duration. If not called explicitly, NcbiLog_AppStart() is called by most other functions (but application arguments will not be logged in this case).

Parameters
argc The count of arguments that follow in argv (from main()). argv An array of null-terminated strings representing command-line arguments of the program (from main()).
See also
NcbiLog_AppRun, NcbiLog_AppStop

Definition at line 3357 of file ncbi_c_log.c.

References ctx, MT_LOCK_API, MT_UNLOCK, NULL, s_AppStart(), and s_GetContext().

Referenced by main(), and CNcbiApplogApp::Run().

◆ NcbiLog_AppStop() void NcbiLog_AppStop ( int  exit_status ) ◆ NcbiLog_AppStopSignal() void NcbiLog_AppStopSignal ( int  exit_status, int  exit_signal  ) ◆ NcbiLog_Context_Attach() ◆ NcbiLog_Context_Create()

Create new thread-specific logging context object.

These context-specific methods to create, attach, detach and destroy thread-specific logging context objects allow to separate context from the API, store it somewhere else and use when necessary, even from different threads. Because the API initialization can be done in background, it is impossible to pass application name used in each logging message, so it will be "UNKNOWN" by default. But, you can call NcbiLog_Init() or NcbiLog_InitForAttachedContext(), or one of its variants. Or, you can hard-code application name on the compilation step, using "-D NCBI_C_LOG_APPNAME=appname" in the compiler's command line for this API.

Note
You should call this method first, before using any other API methods.
Created context have a thread id of the thread that created it. Thread id can be changed if necessary using NcbiLog_SetThreadId() after attaching context to the API.
Default MT locking implementation will be used in MT configurations, you cannot use your own MT-handler with this type on initialization.
Also, please read NcbiLog_Init() and comments at the beginning of this file.
Returns
Handle to newly created context object or NULL on error.
See also
NcbiLog_Context_Attach, NcbiLog_Context_Detach, NcbiLog_Context_Destroy, NcbiLog_ForAttachedContext

Definition at line 2644 of file ncbi_c_log.c.

References ctx, NcbiLog_InitForAttachedContext(), NULL, and s_CreateContext().

◆ NcbiLog_Context_Destroy() ◆ NcbiLog_Context_Detach() void NcbiLog_Context_Detach ( void  ) ◆ NcbiLog_Critical() void NcbiLog_Critical ( const char *  msg ) ◆ NcbiLog_Default_MTLock_Handler()

Default implementation of simple MT locking callback.

Parameters
user_data Simple default handler don't use this parameter; will be ignored. action Operation that should be done in the callback handler.
Returns
Non-zero value if the requested operation was successful.
See also
FNcbiLog_MTLock_Handler, NcbiLog_MTLock_Create

Definition at line 255 of file ncbi_c_log.c.

Referenced by NcbiLog_InitMT().

◆ NcbiLog_Destroy() void NcbiLog_Destroy ( void  )

Destroy NcbiLog API.

This function should be called last. After it any other API's calls will be ignored. For MT applications see also NcbiLog_Destroy_Thread().

See also
NcbiLog_Init, NcbiLog_InitForAttachedContext

Definition at line 2602 of file ncbi_c_log.c.

References SInfo_tag::app_base_name, SInfo_tag::app_full_name, CLOSE_CLEANUP, free(), SInfo_tag::message, MT_LOCK, NcbiLog_MTLock_Delete(), NULL, s_CloseLogFiles(), s_DestroyContext(), s_TlsDestroy(), sx_Info, sx_IsEnabled, sx_IsInit, sx_MTLock, sx_MTLock_Own, and sx_TlsIsInit.

Referenced by CNcbiApplogApp::Cmd_Health(), main(), and CNcbiApplogApp::Run().

◆ NcbiLog_Destroy_Thread() void NcbiLog_Destroy_Thread ( void  ) ◆ NcbiLog_Error() void NcbiLog_Error ( const char *  msg ) ◆ NcbiLog_Extra()

Can be called at any time.

Writes the 'extra' line to the <appname>.log file. Can take a pointer to NULL-terminated array with parameters, as key/value pairs; that data will be logged. Appropriate for logging thing such as HTTP referrer information and cookie values. Should NOT be used for executing tracing or logging of debugging info – see the NcbiLog_Trace function for those purposes.

Definition at line 3716 of file ncbi_c_log.c.

References CHECK_APP_START, ctx, MT_LOCK_API, MT_UNLOCK, NULL, s_Extra(), and s_GetContext().

Referenced by main().

◆ NcbiLog_Fatal() void NcbiLog_Fatal ( const char *  msg ) ◆ NcbiLog_FreeMemory() void NcbiLog_FreeMemory ( void *  ptr )

Free memory allocated inside the C logging API.

Can be useful when using from JAVA/Python wrappers, that cannot deallocate memory directly.

Parameters
ptr Pointer to allocated memory.
See also
NcbiLog_GetNextSubHitID

Definition at line 3264 of file ncbi_c_log.c.

References free().

◆ NcbiLog_GetCurrentSubHitID() char* NcbiLog_GetCurrentSubHitID ( void  ) ◆ NcbiLog_GetCurrentSubHitID_Prefix() char* NcbiLog_GetCurrentSubHitID_Prefix ( const char *  prefix )

Get the last generated sub-hit ID.

Parameters
prefix Prefix for generated sub-hit ID string. Empty if NULL.
Returns
Last generated sub-hit ID. if NcbiLog_GetNextSubHitID() has never been called, it returns subhit with the current value of the counter, which is zero.
Attention
This function should be called after NcbiLog_AppRun().
The caller is responsible for freeing the returned sub-hit ID string! Use free() or NcbiLog_FreeMemory().
See also
NcbiLog_AppSetHitID, NcbiLog_SetHitID, NcbiLog_FreeMemory, NcbiLog_GetNextSubHitID

Definition at line 3218 of file ncbi_c_log.c.

References ctx, eNcbiLog_AppBegin, eNcbiLog_NotSet, MT_LOCK_API, MT_UNLOCK, NULL, s_GetContext(), s_GetSubHitID(), SInfo_tag::state, sx_Info, and TROUBLE_MSG.

Referenced by NcbiLog_GetCurrentSubHitID().

◆ NcbiLog_GetHitID() char* NcbiLog_GetHitID ( void  )

Get hit ID (HID, a.k.a.

PHID) for the request.

Returns
Attention
This function should be called inside request, after NcbiLog_ReqRun().
The caller is responsible for freeing the returned string! Use free() or NcbiLog_FreeMemory().
See also
NcbiLog_AppSetHitID, NcbiLog_SetHitID, NcbiLog_ReqRun

Definition at line 3132 of file ncbi_c_log.c.

References ctx, MT_LOCK_API, MT_UNLOCK, NULL, SInfo_tag::phid, SInfo_tag::phid_inherit, s_GetContext(), s_IsInsideRequest(), s_StrDup(), and sx_Info.

◆ NcbiLog_GetHostLocation() const char* NcbiLog_GetHostLocation ( void  ) ◆ NcbiLog_GetHostName() const char* NcbiLog_GetHostName ( void  )

Get host name.

If $NCBI_HOST environment variable is defined, use its value. Otherwise, try to detect host name.

The order is: cached host name, $NCBI_HOST, uname() or COMPUTERNAME, empty string.

Definition at line 573 of file ncbi_c_log.c.

References buf, NULL, and s_StrDup().

Referenced by CNcbiApplogApp::Redirect(), CNcbiApplogApp::Run(), s_CreateUID(), and s_PrintCommonPrefix().

◆ NcbiLog_GetHostRole() const char* NcbiLog_GetHostRole ( void  ) ◆ NcbiLog_GetNextSubHitID() char* NcbiLog_GetNextSubHitID ( void  ) ◆ NcbiLog_GetNextSubHitID_Prefix() char* NcbiLog_GetNextSubHitID_Prefix ( const char *  prefix )

Generate a sub-hit ID based on the currently effective (whether it's request-specific or application-wide) hit ID.

Parameters
prefix Prefix for generated sub-hit ID string. Empty if NULL.
Returns
Generated sub-hit ID.
Attention
This function should be called after NcbiLog_AppRun().
The caller is responsible for freeing the returned sub-hit ID string! Use free() or NcbiLog_FreeMemory().
See also
NcbiLog_AppSetHitID, NcbiLog_SetHitID, NcbiLog_FreeMemory, NcbiLog_GetCurrentSubHitID

Definition at line 3244 of file ncbi_c_log.c.

References ctx, eNcbiLog_AppBegin, eNcbiLog_NotSet, MT_LOCK_API, MT_UNLOCK, NULL, s_GetContext(), s_GetSubHitID(), SInfo_tag::state, sx_Info, and TROUBLE_MSG.

Referenced by NcbiLog_GetNextSubHitID().

◆ NcbiLog_GetRequestId() ◆ NcbiLog_GetSession() char* NcbiLog_GetSession ( void  )

Get sessio ID (SID) for the request.

Returns
Attention
This function should be called inside request, after NcbiLog_ReqRun().
The caller is responsible for freeing the returned string! Use free() or NcbiLog_FreeMemory().
See also
NcbiLog_AppGetSession, NcbiLog_ReqRun, NcbiLog_FreeMemory

Definition at line 2987 of file ncbi_c_log.c.

References ctx, MT_LOCK_API, MT_UNLOCK, NULL, s_GetContext(), s_IsInsideRequest(), s_StrDup(), SInfo_tag::session, and sx_Info.

◆ NcbiLog_GetState() ◆ NcbiLog_Info() void NcbiLog_Info ( const char *  msg ) ◆ NcbiLog_Init()

Initializing NcbiLog API.

This function should be called before any other API's function. Only first call of NcbiLog_Init() have effect. All subsequent calls will be ignored. Preferable, in MT applications it should be called before creating any child thread uses logging.

Parameters
appname Set the application name shown in logs and used for logfile names. By default the name is unknown. The application name can be set only once at API initialization (using NcbiLog_Init() call). This name could include path and extension, only base name will be used to show in logs. Also, any spaces contained in the base file name will be URL-encoded. Also, the application name can be hard-coded on the compilation step, using "-D NCBI_C_LOG_APPNAME=appname" in the compiler's command line for this API. Hard-coded name have a priority over the passed parameter. mt_lock User defined MT lock. It is necessary to use NcbiLog API in multi-threaded applications. own_mt_lock MT lock ownership flag. If eNcbiLog_MT_TakeOwnership is passed, then the MT lock handler will be destroyed in NcbiLog_Destroy().
Note
It is recommended to call NcbiLog_InitST() instead of NcbiLog_Init[MT]() if you don't use logging simultaneously from some threads.
See also
NcbiLog_InitMT, NcbiLog_InitST, NcbiLog_Destroy, NcbiLog_MTLock_Create, NcbiLog_Context_Create
Note
Sometimes, simplified logging initialization can be used. For details please see NcbiLog_Context_Create() description and comments at the beginning of this file.

Definition at line 2520 of file ncbi_c_log.c.

References eNcbiLog_MT_TakeOwnership, MT_INIT, MT_LOCK, MT_UNLOCK, s_Init(), sx_IsInit, sx_MTLock, sx_MTLock_Own, and VERIFY.

Referenced by main(), NcbiLog_InitMT(), and NcbiLog_InitST().

◆ NcbiLog_InitForAttachedContext() void NcbiLog_InitForAttachedContext ( const char *  appname )

Version of NcbiLog_Init to use with NcbiLog_Context_* functions only.

This function should be called before any other API's function. Only first call of NcbiLog_InitForAttachedContext() have effect. All subsequent calls will be ignored. You can skip it if you don't wish to set up an application name for logging, all initialization will be done in background.

Note
Default MT locking implementation will be used, you cannot use your own locking using with this type on initialization.
For details please see NcbiLog_Context_Create() description and comments at the beginning of this file.
Parameters
appname Set the application name shown in logs and used for logfile names. By default the name is unknown. The application name can be set only once at API initialization. This name could include path and extension, only base name will be used to show in logs. Also, any spaces contained in the base file name will be URL-encoded. Also, the application name can be hard-coded on the compilation step, using "-D NCBI_C_LOG_APPNAME=appname" in the compiler's command line for this API. Hard-coded name have a priority over passed parameter.
See also
NcbiLog_Init, NcbiLog_InitForAttachedContextST, NcbiLog_Context_Create

Definition at line 2560 of file ncbi_c_log.c.

References MT_INIT, MT_LOCK, MT_UNLOCK, s_Init(), and sx_IsInit.

Referenced by NcbiLog_Context_Create().

◆ NcbiLog_InitForAttachedContextST() void NcbiLog_InitForAttachedContextST ( const char *  appname ) ◆ NcbiLog_InitMT() void NcbiLog_InitMT ( const char *  appname ) ◆ NcbiLog_InitST() void NcbiLog_InitST ( const char *  appname ) ◆ NcbiLog_MTLock_Create() ◆ NcbiLog_MTLock_Delete() ◆ NcbiLog_NewHitID() void NcbiLog_NewHitID ( void  ) ◆ NcbiLog_NewSession() void NcbiLog_NewSession ( void  ) ◆ NcbiLog_Note() ◆ NcbiLog_Perf()

Can be called at any time.

Writes the 'perf' line to the <appname>.log file. Used to log a performance information. Takes status code of some operation, its execution time and a pointer to NULL-terminated array with parameters, as key/value pairs.

Definition at line 3738 of file ncbi_c_log.c.

References buf, CATCH, CHECK_APP_START, ctx, eDiag_Perf, SInfo_tag::message, MT_LOCK_API, MT_UNLOCK, NCBILOG_ENTRY_MAX, NULL, SInfo_tag::phid, s_GetContext(), s_IsInsideRequest(), s_Post(), s_PrintCommonPrefix(), s_PrintParams(), s_PrintParamsPair(), sx_Info, and VERIFY_CATCH.

Referenced by main().

◆ NcbiLog_ReqRun() void NcbiLog_ReqRun ( void  )

Should be called once request processing initialization is complete.

It changes the application state shown in the log to 'R' and log request-specific extra information, if any.

See also
NcbiLog_ReqStart, NcbiLog_ReqStop

Definition at line 3602 of file ncbi_c_log.c.

References CHECK_APP_START, ctx, eNcbiLog_Request, MT_LOCK_API, MT_UNLOCK, NCBILOG_HITID_MAX, NULL, SInfo_tag::phid, SInfo_tag::phid_inherit, s_GenerateHitID_Str(), s_GetContext(), s_LogHitID(), s_SetHitID(), s_SetState(), and sx_Info.

Referenced by main(), and CNcbiApplogApp::Run().

◆ NcbiLog_ReqStart()

Should be called once application startup is complete, before any request processing code is run.

Writes the 'request-start' line to the <appname>.log file. Sets or resets the start time of the current request; that data is later used by NcbiLog_ReqStop() to calculate the request runtime duration. Can optionally be passed a pointer to NULL-terminated array with parameters, as key/value pairs; that data will be logged. This method also resets the client and session information. If the user has provided alternate info, it may be overridden as a side-effect of calling this method. Automatically increase request id number.

See also
NcbiLog_SetRequestId, NcbiLog_ReqStop

Definition at line 3546 of file ncbi_c_log.c.

References CATCH, ctx, eDiag_Log, SNcbiLog_Param::key, SInfo_tag::message, MT_LOCK_API, MT_UNLOCK, NCBILOG_ENTRY_MAX, NULL, prev(), s_GetContext(), s_Post(), s_PrintParams(), s_PrintReqStartExtraParams(), s_ReqStart(), sx_Info, and VERIFY_CATCH.

Referenced by main().

◆ NcbiLog_ReqStop() void NcbiLog_ReqStop ( int  status, size_t  bytes_rd, size_t  bytes_wr  )

Should be called once request processing is complete.

Writes the 'request-stop' line to the <appname>.log file. Calculates request runtime duration based on a start time recorded when NcbiLog_ReqStart() is called. Session and client information is reset to UNK_SESSION and UNK_CLIENT.

See also
NcbiLog_ReqStart

Definition at line 3638 of file ncbi_c_log.c.

References CATCH, CHECK_APP_START, ctx, eDiag_Log, eNcbiLog_AppRun, eNcbiLog_RequestEnd, SInfo_tag::message, MT_LOCK_API, MT_UNLOCK, NULL, SInfo_tag::post_time, s_DiffTime(), s_GetContext(), s_Post(), s_PrintCommonPrefix(), s_SetState(), sx_Info, and VERIFY_CATCH.

Referenced by main(), and CNcbiApplogApp::Run().

◆ NcbiLog_SetClient() void NcbiLog_SetClient ( const char *  client )

Set client for the request.

This setting is effective for a single request:

If the client is not explicitly set for a request, this value is taken from the environment variables. If that is not populated, then the application wide value (see NcbiLog_AppSetClient()) will be used for the request.

Attention
NcbiLog_ReqStop() resets the client back to the application-wide value!
Parameters
client New client name (IP address). It will be set to 'UNK_CLIENT' if parameter is NULL or empty string.
See also
NcbiLog_AppSetClient, NcbiLog_ReqStart, NcbiLog_ReqStop

Definition at line 2949 of file ncbi_c_log.c.

References client, ctx, MT_LOCK_API, MT_UNLOCK, NULL, s_GetContext(), and s_SetClient().

Referenced by main(), and CNcbiApplogApp::SetInfo().

◆ NcbiLog_SetDestination()

Set up diagnostics destination.

Parameters
ds An enum value to specify an application's diagnostics destination.
Returns
The diagnostic destination that was really set. It is not always possible to set up an destination for logging messages that specified in parameters and fallback can be used. See ENcbiLog_Destination description for details. Sets to eNcbiLog_Disable in the case of critical errors.
Note
If destination is set to eNcbiLog_File you need to call NcbiLog_SetDestinationFile(), that accept file name as parameter. Also, an environment variable $NCBI_CONFIG__LOG__FILE can be used to define a base file name for logging. But it is recommended to use NcbiLog_SetDestinationFile() if you need to log into some local file.
By default, if SetDestination() has not called or set to eNcbiLog_Default, and environment variable $NCBI_CONFIG__LOG__FILE is defined and not empty, its value will be used as base name for logfiles. It can have special value "-" to redirect all output to STDERR.
See also
ENcbiLog_Destination, NcbiLog_Init, NcbiLog_SetSplitLogFile, NcbiLog_SetDestinationFile

Definition at line 2753 of file ncbi_c_log.c.

References CLOSE_CLEANUP, SInfo_tag::destination, eNcbiLog_Default, eNcbiLog_Disable, eNcbiLog_Stderr, int, SInfo_tag::last_reopen_time, MT_LOCK_API, MT_UNLOCK, NCBILOG_PORT_MAX, NULL, s_CloseLogFiles(), s_InitDestination(), SInfo_tag::server_port, util::strcmp(), and sx_Info.

Referenced by main().

◆ NcbiLog_SetDestinationFile()

Variant of NcbiLog_SetDestination for logging to a specific file (eNcbiLog_File).

This is CLog/ncbi_applog specific, not a standard feature.

Parameters
logfile_base A base name for a log file(-es). If splitting is disabled, there will be a single <logfile_base>.log file, or some files with err/perf/trace extentions otherwise.
Returns
The diagnostic destination that was really set. Sets to eNcbiLog_Disable in the case of critical errors.
See also
NcbiLog_SetDestination, ENcbiLog_Destination, NcbiLog_Init

Definition at line 2801 of file ncbi_c_log.c.

References CLOSE_CLEANUP, SInfo_tag::destination, eNcbiLog_Disable, eNcbiLog_File, eNcbiLog_Stderr, SInfo_tag::last_reopen_time, MT_LOCK_API, MT_UNLOCK, NULL, s_CloseLogFiles(), s_InitDestination(), util::strcmp(), and sx_Info.

Referenced by CNcbiApplogApp::Run().

◆ NcbiLog_SetHitID() void NcbiLog_SetHitID ( const char *  hit_id )

Set hit ID (HID, a.k.a.

PHID) for the request.

This setting is effective for a single request:

If (P)HID has not been explicitly set for a request, that the application- wide value (per NcbiLog_AppSetHitID() or env.variable, if any) will be used for the request as well. If no explicitly set application-wide (P)HID, that new (P)HID will be generated for the request on NcbiLog_ReqStart().

Attention
NcbiLog_ReqStop() resets the request-specific (P)HID back to the application-wide value (if any) or unset state.
PHID will be logged whenever it changes, immediately, if called inside request, or on the next NcbiLog_ReqRun() if called between requests.
Parameters
hit_id New (P)HID. (It will be URL-encoded.) (P)HID will be unset if the parameter is NULL or point to empty string.
See also
NcbiLog_AppSetHitID, NcbiLog_ReqStart, NcbiLog_ReqRun, NcbiLog_ReqStop, NcbiLog_AppGetHitID, NcbiLog_GetNextSubHitID

Definition at line 3078 of file ncbi_c_log.c.

References ctx, MT_LOCK_API, MT_UNLOCK, NULL, s_GetContext(), s_IsInsideRequest(), s_LogHitID(), s_SetHitID(), and util::strcmp().

Referenced by CNcbiApplogApp::SetInfo().

◆ NcbiLog_SetHost() void NcbiLog_SetHost ( const char *  host )

Set the host name.

By default, this value is taken from the system.

Parameters
host New host name. It will be set to 'UNK_HOST' if parameter is NULL or empty string.
Note
This method does not affect GUID value if called after starting logging.

Definition at line 2933 of file ncbi_c_log.c.

References MT_LOCK_API, MT_UNLOCK, and s_SetHost().

Referenced by CNcbiApplogApp::SetInfo().

◆ NcbiLog_SetPostLevel() ◆ NcbiLog_SetProcessId() ◆ NcbiLog_SetRequestId() ◆ NcbiLog_SetSession() void NcbiLog_SetSession ( const char *  session )

Set session ID (SID) for the request.

This setting is effective for a single request:

If SID is not explicitly set for a request, then the application- wide value (per NcbiLog_AppSetSession() or NcbiLog_AppNewSession()) will be used for the request.

Attention
NcbiLog_ReqStop() resets the SID back to the application-wide value!
Parameters
session New session ID. (It will be URL-encoded.) It will be set to 'UNK_SESSION' if the parameter is NULL or empty string.
See also
NcbiLog_AppSetSession, NcbiLog_AppNewSession, NcbiLog_ReqStart, NcbiLog_ReqStop

Definition at line 3009 of file ncbi_c_log.c.

References ctx, MT_LOCK_API, MT_UNLOCK, NULL, s_GetContext(), and s_SetSession().

Referenced by main(), and CNcbiApplogApp::SetInfo().

◆ NcbiLog_SetSplitLogFile() void NcbiLog_SetSplitLogFile ( int  value )

Set split log files flag.

If set, the output for log/err/trace/perf records will be sent to a different log files, or to a single .log file, otherwise. Splitting is OFF by default, except if you logging to /log. The log files writting there always split, and you cannot disable this.

Note
You can change splitting if logging destination set to eNcbiLog_Cwd or eNcbiLog_File only.
When logging to /log the log files are always split, regardless of the setting.
See also
NcbiLog_SetDestination

Definition at line 2874 of file ncbi_c_log.c.

References MT_LOCK_API, MT_UNLOCK, SInfo_tag::split_log_file, sx_Info, and rapidjson::value.

Referenced by CNcbiApplogApp::Cmd_Health().

◆ NcbiLog_SetThreadId() ◆ NcbiLog_SetTime() void NcbiLog_SetTime ( time_t  timer, unsigned long  nanoseconds  )

Set the posting date and time.

By default, system-provided time is used. It can speed up a logging if date/time is already known before calling any post function. It also can be used to alter the time of the posting.

Parameters
timer GMT date and time at which the message was posted (see time()). This time value will be converted to local date/time automatically. The current date/time will be used if this parameter is zero. nanoseconds Nanosecond part of the time.
Attention
The set value will be used for all subsequent postings! To start using system time again, call NcbiLog_SetTime(0,0).

Definition at line 2923 of file ncbi_c_log.c.

References MT_LOCK_API, MT_UNLOCK, STime_tag::ns, SInfo_tag::post_time, STime_tag::sec, sx_Info, and SInfo_tag::user_posting_time.

Referenced by main().

◆ NcbiLog_Trace() void NcbiLog_Trace ( const char *  msg ) ◆ NcbiLog_UpdateOnFork()

Update logging internal information after fork().

This function should be called immediatly after fork(), before any other NcbiLog_* functions, or you will get a wrong and unpredictable output, Updates PID if necessary (in the child process). If PID has not changed (parent process), no other actions are performed. Can do additional actions depending on flags.

See also
NcbiLog_Init, NcbiLog_Destroy

Definition at line 3953 of file ncbi_c_log.c.

References SInfo_tag::app_start_time, buf, ctx, eNcbiLog_AppRun, eNcbiLog_NotSet, flags, fNcbiLog_OnFork_PrintStart, fNcbiLog_OnFork_ResetTimer, SInfo_tag::guid, int, kIdBufSize, MT_LOCK_API, MT_UNLOCK, n, NCBILOG_UINT8_FORMAT_SPEC, NULL, SInfo_tag::phid, s_AppStart(), s_CreateUID(), s_ExtraStr(), s_GetContext(), s_GetTID(), s_GetTime(), s_LogHitID(), s_SetState(), SInfo_tag::state, sx_Info, sx_PID, and VERIFY.

◆ NcbiLog_Warning() void NcbiLog_Warning ( const char *  msg ) ◆ New() ◆ OnRequestStart() [1/3]

Implements IRequestTracer.

Definition at line 135 of file jaeger_tracer.cpp.

References buf, context, CDiagContext::Extra(), GetCurrentThreadSystemID(), GetDiagContext(), CDiagContext::GetHost(), CDiagContext::GetPID(), CDiagContext::GetStringUID(), CDiagContext::GetUID(), hex(), id_hash(), and CDiagContext_Extra::Print().

◆ OnRequestStart() [2/3]

Implements IRequestTracer.

Definition at line 415 of file opentelemetry_tracer.cpp.

References buf, context, ITracerSpan::eKind_Client, ITracerSpan::eKind_Internal, ITracerSpan::eKind_Server, ERR_POST, CDiagContext::Extra(), flags, GetCurrentThreadSystemID(), GetDiagContext(), CDiagContext::GetHost(), CDiagContext::GetPID(), CDiagContext::GetRequestContext(), CDiagContext::GetStringUID(), CDiagContext::GetUID(), CDiagContext_Extra::Print(), s_DefaultSpanNamePrefix, s_GetTracer(), s_ParseIds(), s_UpdateTraceState(), string, and Warning().

◆ OnRequestStart() [3/3] ◆ OnRequestStop() [1/3] ◆ OnRequestStop() [2/3] ◆ OnRequestStop() [3/3] ◆ operator delete() void CDiagRestorer::operator delete ( void *  ) inlineprivate

Private delete operator.

Prohibit dynamic deallocation (and allocation) because there's no good reason to allow it, and out-of-order destruction is problematic.

Definition at line 2974 of file ncbidiag.hpp.

◆ operator delete[]() void CDiagRestorer::operator delete[] ( void *  ) inlineprivate

Private delete[] operator.

Prohibit dynamic deallocation (and allocation) because there's no good reason to allow it, and out-of-order destruction is problematic.

Definition at line 2980 of file ncbidiag.hpp.

◆ operator new() void* CDiagRestorer::operator new ( size_t  ) inlineprivate

Private new operator.

Prohibit dynamic allocation because there's no good reason to allow it, and out-of-order destruction is problematic.

Definition at line 2962 of file ncbidiag.hpp.

◆ operator new[]() void* CDiagRestorer::operator new[] ( size_t  ) inlineprivate

Private new[] operator.

Prohibit dynamic allocation because there's no good reason to allow it, and out-of-order destruction is problematic.

Definition at line 2968 of file ncbidiag.hpp.

◆ operator()() virtual void INextDiagMessage::operator() ( SDiagMessagemsg ) pure virtual ◆ operator<<() [1/6] ◆ operator<<() [2/6] ◆ operator<<() [3/6] ◆ operator<<() [4/6] ◆ operator<<() [5/6] ◆ operator<<() [6/6] ◆ operator=() [1/5] ◆ operator=() [2/5] ◆ operator=() [3/5]

Private assignment operator to prohibit assignment.

◆ operator=() [4/5] ◆ operator=() [5/5]

Assignment of messages.

Definition at line 4718 of file ncbidiag.cpp.

References SDiagMessage::m_AllowBadExtraNames, SDiagMessageData::m_AppName, SDiagMessageData::m_AppState, SDiagMessage::m_Buffer, SDiagMessage::m_BufferLen, SDiagMessage::m_Class, SDiagMessageData::m_Class, SDiagMessageData::m_Client, SDiagMessage::m_Data, SDiagMessage::m_ErrCode, SDiagMessage::m_ErrSubCode, SDiagMessage::m_ErrText, SDiagMessageData::m_ErrText, SDiagMessage::m_Event, SDiagMessage::m_ExtraArgs, SDiagMessage::m_File, SDiagMessageData::m_File, SDiagMessage::m_Flags, SDiagMessage::m_Format, SDiagMessage::m_Function, SDiagMessageData::m_Function, SDiagMessageData::m_Host, SDiagMessage::m_Line, SDiagMessageData::m_Message, SDiagMessage::m_Module, SDiagMessageData::m_Module, SDiagMessage::m_PID, SDiagMessage::m_Prefix, SDiagMessageData::m_Prefix, SDiagMessage::m_ProcPost, SDiagMessage::m_RequestId, SDiagMessageData::m_Session, SDiagMessage::m_Severity, SDiagMessage::m_ThrPost, SDiagMessage::m_TID, SDiagMessage::m_TypedExtra, string, and SDiagMessage::x_SaveContextData().

◆ ParseCurrFunctName() void CDiagCompileInfo::ParseCurrFunctName ( void  ) const private ◆ ParseDiagStream() ◆ ParseMessage()

Parse the whole string into the message.

Return true on success, false if parsing failed.

Definition at line 4984 of file ncbidiag.cpp.

References eDiag_Critical, eDiag_Error, eDiag_Fatal, eDiag_Info, eDiag_Trace, eDiag_Warning, eDiagAppState_AppRun, eDiagSevMin, eDPF_AppLog, eDPF_IsNote, SDiagMessage::eEvent_Extra, SDiagMessage::eEvent_PerfLog, SDiagMessage::eEvent_RequestStart, SDiagMessage::eEvent_RequestStop, SDiagMessage::eEvent_Start, SDiagMessage::eEvent_Stop, SDiagMessage::eFormat_Auto, SDiagMessage::eFormat_New, SDiagMessage::GetEventName(), kDiagTimeFormat, kDiagW_UID, kUnknown_App, kUnknown_Client, kUnknown_Host, kUnknown_Session, lbr(), SDiagMessageData::m_AppName, SDiagMessageData::m_AppState, SDiagMessage::m_Buffer, SDiagMessage::m_BufferLen, SDiagMessage::m_Class, SDiagMessageData::m_Class, SDiagMessageData::m_Client, SDiagMessage::m_Data, SDiagMessage::m_ErrCode, SDiagMessage::m_ErrSubCode, SDiagMessage::m_ErrText, SDiagMessageData::m_ErrText, SDiagMessage::m_Event, SDiagMessage::m_File, SDiagMessageData::m_File, SDiagMessage::m_Flags, SDiagMessage::m_Format, SDiagMessage::m_Function, SDiagMessageData::m_Function, SDiagMessageData::m_Host, SDiagMessage::m_Line, SDiagMessageData::m_Message, SDiagMessage::m_Module, SDiagMessageData::m_Module, SDiagMessage::m_PID, SDiagMessage::m_Prefix, SDiagMessage::m_ProcPost, SDiagMessage::m_RequestId, SDiagMessageData::m_Session, SDiagMessage::m_Severity, SDiagMessage::m_ThrPost, SDiagMessage::m_TID, SDiagMessageData::m_Time, SDiagMessage::m_TypedExtra, SDiagMessageData::m_UID, NPOS, s_ParseInt(), s_ParseStr(), s_StrToAppState(), string, NStr::StringToInt(), NStr::StringToUInt8(), CNcbiDiag::StrToSeverityLevel(), tmp, and SDiagMessage::x_ParseExtraArgs().

Referenced by SDiagMessage::SDiagMessage().

◆ PopDiagPostPrefix() void PopDiagPostPrefix ( void  ) ◆ Post() [1/12] ◆ Post() [2/12]

Post message to the handler.

Implements CDiagHandler.

Definition at line 6716 of file ncbidiag.cpp.

References CObject::AddReference(), CFileHandleDiagHandler::ComposeMessage(), CStopWatch::Elapsed(), CDiagLock::ePost, CDiagHandler::fDefault, CDiagFileHandleHolder::GetHandle(), CStopWatch::IsRunning(), kLogReopenDelay, CFileHandleDiagHandler::m_Handle, CFileHandleDiagHandler::m_HandleLock, CFileHandleDiagHandler::m_HavePosts, CFileHandleDiagHandler::m_Messages, CFileHandleDiagHandler::m_ReopenTimer, NcbiSys_write, CObject::RemoveReference(), CFileHandleDiagHandler::Reopen(), s_ReopenEntered, and str().

◆ Post() [3/12]

Post message to the handler.

Info and Trace messages are sent to file_name.trace file, all others go to file_name.err file. Application access messages go to file_name.log file.

Implements CDiagHandler.

Definition at line 7205 of file ncbidiag.cpp.

References CStopWatch::Elapsed(), CDiagLock::ePost, CDiagHandler::fDefault, CStopWatch::IsRunning(), kLogReopenDelay, CFileDiagHandler::m_ReopenTimer, CFileDiagHandler::Reopen(), s_ReopenEntered, CFileDiagHandler::x_GetDiagFileType(), and CFileDiagHandler::x_GetHandler().

◆ Post() [4/12]

Implementation of CDiagHandler.

Implements CDiagHandler.

Definition at line 7372 of file ncbidiag.cpp.

References CDiagHandler::ComposeMessage(), CSafeStatic< T, Callbacks >::Get(), GetDiagDieLevel(), CGuard< Resource, Lock, Unlock, ReportExceptions >::Guard(), CAsyncDiagHandler::m_AsyncThread, SAsyncDiagMessage::m_Composed, SAsyncDiagMessage::m_FileType, SAsyncDiagMessage::m_Message, SDiagMessage::m_Severity, NCBI_PARAM_TYPE(), CGuard< Resource, Lock, Unlock, ReportExceptions >::Release(), string, and thr.

◆ Post() [5/12]

Post message to handler.

Implements CDiagHandler.

Definition at line 100 of file syslog.cpp.

References CSysLog::eAlert, CSysLog::eCritical, CSysLog::eDebug, eDiag_Critical, eDiag_Error, eDiag_Fatal, eDiag_Info, eDiag_Trace, eDiag_Warning, CSysLog::eError, CSysLog::eInfo, CSysLog::eNotice, CSysLog::eWarning, SDiagMessage::fNoEndl, SDiagMessage::m_Severity, and SDiagMessage::Write().

Referenced by CSysLog::Post().

◆ Post() [6/12]

Post message to handler.

Implemented in CLogLatencyReport::SHandler, CNcbiToolkitImpl_DiagHandler, CWindowsCmdErrorHandler, CwxLogDiagHandler, CPythonDiagHandler, CTable2AsnLogger, CCompatDiagHandler, CTeeDiagHandler, CCommentDiagHandler, CSysLog, CAsyncDiagHandler, CFileDiagHandler, CFileHandleDiagHandler, CStreamDiagHandler, and CBlastAppDiagHandler.

Referenced by CAsyncDiagThread::Main(), CBlastAppDiagHandler::Post(), CTeeDiagHandler::Post(), and CwxLogDiagHandler::Post().

◆ Post() [7/12] ◆ Post() [8/12] ◆ Post() [9/12]

Log the timing; stop and deactivate the timer.

Parameters
resource Name of the resource (must be non-empty, else throws an exception). status Status of the timed code. status_msg Verbal description of the status of the timed code.
Note
If the timer is already inactive, then post an error (once).
If an external stopwatch was provided, it is stopped by this method.
See also
Discard

Definition at line 436 of file perf_log.hpp.

Referenced by g_DoErasePerfLogging(), g_DoPerfLogging(), CPerfLogGuard::Post(), and s_DoDonePerfLogging().

◆ Post() [10/12] ◆ Post() [11/12]

Definition at line 69 of file perf_log.cpp.

References CTime::AsString(), CPerfLogger::Discard(), CStopWatch::Elapsed(), CTempString::empty(), CDiagContext::Extra(), g_PostPerf(), GetDiagContext(), GetFastLocalTime(), CTime::IsEmpty(), CPerfLogger::IsON(), CPerfLogger::m_Adjustment, CPerfLogger::m_Elapsed, CPerfLogger::m_FirstStartTime, CPerfLogger::m_LastStartTime, CPerfLogger::m_StopWatch, NCBI_THROW, CPerfLogger::Suspend(), and CPerfLogger::x_CheckValidity().

◆ Post() [12/12] ◆ PostEvent() [1/3] ◆ PostEvent() [2/3]

Implements ITracerSpan.

Definition at line 616 of file opentelemetry_tracer.cpp.

References eDPF_AppLog, SDiagMessage::m_Buffer, SDiagMessage::m_BufferLen, SDiagMessage::m_Class, SDiagMessage::m_ErrCode, SDiagMessage::m_ErrSubCode, SDiagMessage::m_ErrText, SDiagMessage::m_File, SDiagMessage::m_Flags, SDiagMessage::m_Function, SDiagMessage::m_Line, SDiagMessage::m_Module, SDiagMessage::m_Prefix, SDiagMessage::m_ProcPost, SDiagMessage::m_Severity, SDiagMessage::m_ThrPost, SDiagMessage::m_TID, msg(), NStr::NumericToString(), CNcbiDiag::SeverityName(), and string.

◆ PostEvent() [3/3] ◆ PostToConsole() ◆ Print() [1/15] ◆ Print() [2/15] ◆ Print() [3/15] ◆ Print() [4/15]

template<class TKey , class TStorage >

Definition at line 1857 of file ncbidiag.hpp.

◆ Print() [5/15]

The method does not print the argument, but adds it to the string.

Name must contain only alphanumeric chars or '_'. Value is URL-encoded before printing.

Definition at line 2724 of file ncbidiag.cpp.

References ERR_POST, kEmptyStr, CDiagContext_Extra::m_Args, s_NcbiApplogKeywords, rapidjson::value, and CDiagContext_Extra::x_CanPrint().

Referenced by CGRPCServerCallbacks::BeginRequest(), CGRPCRequestLogger::CGRPCRequestLogger(), CWNJobWatcher::CheckForInfiniteLoop(), CCgi2RCgiApp::CheckJob(), CVcfTrack::CheckRange(), CompressAssembly(), ColumnarVcfCache::CreateBlob(), CreateErrorRequestContext(), CNetScheduleServer::Exit(), g_DoErasePerfLogging(), g_DoPerfLogging(), g_PostPerf(), CBlastAligner::GenerateAlignments(), CNetStorageHandler::OnClose(), CJaegerTracer::OnRequestStart(), COpentelemetryTracer::OnRequestStart(), CPerfLogGuard::Post(), CDiagContext_Extra::Print(), SInteractiveNewRequestStart::SExtra::Print(), CStatisticsCounters::PrintDelta(), CDiagContext_Extra::PrintNcbiAppInfoOnRequest(), CDiagContext_Extra::PrintNcbiAppInfoOnStart(), CDiagContext_Extra::PrintNcbiRoleAndLocation(), CHttpRequest::PrintParams(), CStatisticsCounters::PrintServerWide(), CDiagContext::PrintStart(), CQueue::PrintStatistics(), CStatisticsCounters::PrintTransitions(), CCgiSampleApplication::ProcessPrintEnvironment(), COperationTiming::Register(), CIgBlast::Run(), CNetScheduleDApp::Run(), CNetStorageDApp::Run(), CNetStorageGCApp::Run(), CAdvancedAlignCleanup::RunSplignOnCompartment(), s_AppendCommonExtras(), CSparseGraph::Save(), ColumnarVcfCache::SetInfoFields(), CDiagContext_Extra::SetType(), CCgi2RCgiApp::SubmitJob(), UncomressAndCreate(), CNgAligner::x_Align_Impl(), CQueue::x_CancelJobs(), CQueue::x_CheckExecutionTimeout(), CSparseGraph::x_CheckRemoteData(), CQueueDataBase::x_CreateAndMountQueue(), CPubseqGatewayApp::x_CreateRequestContext(), CPubseqGatewayApp::x_DispatchRequest(), CNetStorageHandler::x_GetObject(), CGRPCRequestLogger::x_Init(), CNetScheduleHandler::x_LogCommandWithJob(), CDBConnectionFactory::x_LogConnection(), CDiagContext::x_LogEnvironment(), CRequestContext::x_LogHitID(), CDiagContext::x_LogHitID(), CNcbiApplicationAPI::x_LogOptions(), CQueue::x_LogSubmit(), CHttpConnection::x_MaintainBacklog(), CNcbiLogFields::x_Match(), CCgiApplication::x_OnEvent(), CQueueDataBase::x_Open(), CNetScheduleHandler::x_PrintCmdRequestStart(), CNetStorageGCApp::x_PrintFinishCounters(), CNetScheduleHandler::x_PrintGetJobResponse(), CNetStorageHandler::x_PrintMessageRequestStart(), CNetStorageHandler::x_PrintMessageRequestStop(), CNetScheduleHandler::x_ProcessChangeAffinity(), CNetScheduleHandler::x_ProcessClearWorkerNode(), CNetStorageHandler::x_ProcessCreate(), CNetScheduleHandler::x_ProcessGetJob(), CNetScheduleHandler::x_ProcessJobExchange(), CNetScheduleHandler::x_ProcessMsgBatchSubmit(), CNetScheduleHandler::x_ProcessMsgQueue(), CNetScheduleHandler::x_ProcessMsgRequest(), CNetScheduleHandler::x_ProcessReading(), CNetStorageHandler::x_ProcessReconfigure(), CNetScheduleHandler::x_ProcessReloadConfig(), CNetStorageHandler::x_ProcessRelocate(), CNetScheduleHandler::x_ProcessSetAffinity(), CNetScheduleHandler::x_ProcessSetQueue(), CInstancedAligner::x_RunAligner(), CSparseGraph::x_Sync(), and CRequestContext::x_UpdateSubHitID().

◆ Print() [6/15] ◆ Print() [7/15] ◆ Print() [8/15] ◆ Print() [9/15] ◆ Print() [10/15] ◆ Print() [11/15] ◆ Print() [12/15] ◆ Print() [13/15] ◆ Print() [14/15] ◆ Print() [15/15] ◆ PrintExtra() void CDiagContext::PrintExtra ( const stringmessage ) ◆ PrintNcbiAppInfoOnRequest()

Definition at line 2389 of file ncbidiag.cpp.

References SBuildInfo::eDevelopmentVersion, SBuildInfo::eGitBranch, SBuildInfo::eProductionVersion, SBuildInfo::eRevision, SBuildInfo::eStableComponentsVersion, SBuildInfo::eSubversionRevision, SBuildInfo::ExtraNameAppLog(), CVersionAPI::GetBuildInfo(), SBuildInfo::GetExtraValue(), CNcbiApplicationAPI::GetFullVersion(), CVersionInfo::GetMajor(), CVersionInfo::GetMinor(), CVersionInfo::GetPatchLevel(), CVersionAPI::GetVersionInfo(), CNcbiApplication::Instance(), NStr::JoinNumeric(), ncbi::grid::netcache::search::fields::key, NCBI_DEVELOPMENT_VER, NCBI_SUBVERSION_REVISION, NStr::NumericToString(), CDiagContext_Extra::Print(), str(), and rapidjson::value.

Referenced by CDiagContext_Extra::Flush(), and CDiagContext::PrintStart().

◆ PrintNcbiAppInfoOnStart()

Definition at line 2339 of file ncbidiag.cpp.

References SBuildInfo::date, SBuildInfo::eBuildID, SBuildInfo::eBuiltAs, SBuildInfo::eTeamCityBuildConf, SBuildInfo::eTeamCityBuildNumber, SBuildInfo::eTeamCityProjectName, SBuildInfo::ExtraNameAppLog(), CVersionAPI::GetBuildInfo(), SBuildInfo::GetExtraValue(), CNcbiApplicationAPI::GetFullVersion(), CVersionInfo::GetMajor(), CVersionInfo::GetMinor(), CVersionAPI::GetPackageName(), CVersionAPI::GetPackageVersion(), CVersionInfo::GetPatchLevel(), CNcbiApplicationAPI::GetProgramExecutablePath(), CSystemInfo::GetUserName(), CNcbiApplication::Instance(), ncbi::grid::netcache::search::fields::key, NCBI_SBUILDINFO_DEFAULT, NCBI_TEAMCITY_BUILD_ID, NCBI_TEAMCITY_BUILD_NUMBER, NCBI_TEAMCITY_BUILDCONF_NAME, NCBI_TEAMCITY_PROJECT_NAME, NStr::NumericToString(), CDiagContext_Extra::Print(), and rapidjson::value.

Referenced by CDiagContext::PrintStart().

◆ PrintNcbiRoleAndLocation() ◆ PrintProperties() void CDiagContext::PrintProperties ( void  ) ◆ PrintRequestStart() [1/2] void CDiagContext::PrintRequestStart ( const stringmessage )

Print request start message (for request-driven applications)

Deprecated:
Use CDiagContext_Extra version.

Definition at line 2864 of file ncbidiag.cpp.

References eDiagAppState_Request, eDiagAppState_RequestBegin, SDiagMessage::eEvent_RequestStart, CDiagContext::GetAppState(), CDiagContext::SetAppState(), and CDiagContext::x_PrintMessage().

Referenced by CGRPCServerCallbacks::BeginRequest(), CNSClientsRegistry::ClearOnTimeout(), CreateErrorRequestContext(), CNetScheduleServer::Exit(), CStatisticsCounters::PrintServerWide(), CQueue::PrintStatistics(), CNetStorageGCDatabase::RemoveObject(), CPrimeCacheApplication::Run(), CAsnSubCacheCreateApplication::Run(), CNetScheduleHandler::x_CreateConnContext(), CNetStorageHandler::x_CreateConnContext(), CPubseqGatewayApp::x_CreateRequestContext(), CGetJobNotificationThread::x_DoJob(), CJobQueueCleanerThread::x_DoJob(), CJobQueueExecutionWatcherThread::x_DoJob(), CCgiApplication::x_OnEvent(), CNetScheduleHandler::x_PrintCmdRequestStart(), CNetStorageHandler::x_PrintMessageRequestStart(), CNetScheduleHandler::x_ProcessMsgBatchSubmit(), CNetStorageGCApp::x_RemoveObjects(), SWorkerNodeJobContextImpl::x_RunJob(), and SOfflineJobContextImpl::x_RunJob().

◆ PrintRequestStart() [2/2] ◆ PrintRequestStop() void CDiagContext::PrintRequestStop ( void  )

Print request stop message (for request-driven applications)

Definition at line 2880 of file ncbidiag.cpp.

References eDiagAppState_AppRun, eDiagAppState_RequestEnd, SDiagMessage::eEvent_RequestStop, CDiagContext::GetAppState(), kEmptyStr, CDiagContext::SetAppState(), CDiagContext::x_LogHitID_WithLock(), and CDiagContext::x_PrintMessage().

Referenced by CNSClientsRegistry::ClearOnTimeout(), DismissErrorRequestContext(), CGRPCServerCallbacks::EndRequest(), CNetScheduleServer::Exit(), CNetScheduleHandler::OnClose(), CNetStorageHandler::OnClose(), CStatisticsCounters::PrintServerWide(), CQueue::PrintStatistics(), CNetStorageGCDatabase::RemoveObject(), CPrimeCacheApplication::Run(), CAsnSubCacheCreateApplication::Run(), CGetJobNotificationThread::x_DoJob(), CJobQueueCleanerThread::x_DoJob(), CJobQueueExecutionWatcherThread::x_DoJob(), CCgiApplication::x_OnEvent(), CNetScheduleHandler::x_PrintCmdRequestStop(), CNetStorageHandler::x_PrintMessageRequestStop(), SWorkerNodeJobContextImpl::x_PrintRequestStop(), CPubseqGatewayApp::x_PrintRequestStop(), CPSGS_Dispatcher::x_PrintRequestStop(), CNetScheduleHandler::x_ProcessMsgBatchSubmit(), CNetStorageGCApp::x_RemoveObjects(), and CGRPCRequestLogger::~CGRPCRequestLogger().

◆ PrintStart() void CDiagContext::PrintStart ( const stringmessage )

Print start/stop etc.

message. If the following values are set as properties, they will be dumped before the message: host | host_ip_addr client_ip session_id app_name All messages have the following prefix: PID/TID/ITER UID TIME HOST CLIENT SESSION_ID APP_NAME Depending on its type, a message can be prefixed with the following properties if they are set: start stop [SIG] [EXIT_CODE] ELAPSED_TIME extra request-start request-stop [STATUS] [REQ_ELAPSED_TIME] [BYTES_RD] [BYTES_WR]

Definition at line 2197 of file ncbidiag.cpp.

References SDiagMessage::eEvent_Start, CDiagContext::eHitID_NoCreate, env, CFile::Exists(), CDiagContext::Extra(), f, CDiagContext_Extra::Flush(), NStr::fSplit_Tokenize, in(), n, NPOS, CDiagContext_Extra::Print(), CDiagContext_Extra::PrintNcbiAppInfoOnRequest(), CDiagContext_Extra::PrintNcbiAppInfoOnStart(), CDiagContext_Extra::PrintNcbiRoleAndLocation(), NStr::ReplaceInPlace(), NStr::SplitInTwo(), NStr::ToLower(), NStr::TruncateSpaces(), rapidjson::value, CDiagContext::x_GetDefaultHitID(), CDiagContext::x_LogEnvironment(), and CDiagContext::x_PrintMessage().

Referenced by CCgiApplication::AppStart(), and CNcbiApplicationAPI::AppStart().

◆ PrintStop() void CDiagContext::PrintStop ( void  )

Print exit message.

Definition at line 2241 of file ncbidiag.cpp.

References ctx, SDiagMessage::eEvent_Stop, CRequestContext::eHitID_Request, CDiagContext::GetRequestContext(), kEmptyStr, CDiagContext::x_IsSetDefaultHitID(), CDiagContext::x_LogHitID_WithLock(), and CDiagContext::x_PrintMessage().

Referenced by CExec::RunSilent(), s_Daemonize(), s_SpawnUnix(), CExec::Spawn(), CExec::SpawnL(), CExec::SpawnLE(), CExec::SpawnLP(), CExec::SpawnLPE(), CExec::SpawnV(), CExec::SpawnVE(), CExec::SpawnVP(), and CExec::SpawnVPE().

◆ PushDiagPostPrefix() void PushDiagPostPrefix ( const char *  prefix ) ◆ PushMessage() ◆ Put() [1/8] ◆ Put() [2/8] ◆ Put() [3/8]

Helper method to post error code and subcode to diagnostic stream.

Example: CNcbiDiag() << ErrCode(5,3) << "My message";

◆ Put() [4/8] ◆ Put() [5/8]

Helper method to handle various diagnostic stream manipulators.

For example, to set the message severity level to INFO: CNcbiDiag() << Info << "My message";

Definition at line 1011 of file ncbidiag.hpp.

◆ Put() [6/8] ◆ Put() [7/8] ◆ Put() [8/8] ◆ Read() [1/2] ◆ Read() [2/2]

Read error description from specified file.

Read error descriptions from the specified file, store it in memory.

Definition at line 8295 of file ncbidiag.cpp.

References file_name.

◆ Release() [1/3] void CDiagCollectGuard::Release ( EAction  action ) ◆ Release() [2/3] void CDiagCollectGuard::Release ( void  ) ◆ Release() [3/3] void CRequestContextGuard_Base::Release ( void  )

Release the guarded context, restore the saved context if any, do not perform any other actions (logging, setting status).

Definition at line 976 of file request_ctx.cpp.

References GetDiagContext(), CRef< C, Locker >::GetNonNullPointer(), CRequestContextGuard_Base::m_RequestContext, CRequestContextGuard_Base::m_SavedContext, CRef< C, Locker >::Reset(), and CDiagContext::SetRequestContext().

◆ RemoveFromDiag() void CAsyncDiagHandler::RemoveFromDiag ( void  ) ◆ Reopen() [1/4]

Reopen file to enable log rotation.

Reimplemented from CDiagHandler.

Definition at line 6627 of file ncbidiag.cpp.

References CObject::AddReference(), CFileHandleDiagHandler::ComposeMessage(), eDiagFile_Perf, CStopWatch::Elapsed(), CDiagLock::ePost, f, CDiagHandler::fCheck, flags, CDirEntry::fRF_Overwrite, CDirEntry::GetDir(), CFileUtil::GetFreeDiskSpace(), CDiagFileHandleHolder::GetHandle(), CStreamDiagHandler_Base::GetLogName(), CDiagContext::GetPID(), CStopWatch::IsRunning(), ITERATE, kLogReopenDelay, CFileHandleDiagHandler::m_FileType, CFileHandleDiagHandler::m_Handle, CFileHandleDiagHandler::m_HandleLock, CFileHandleDiagHandler::m_HavePosts, CFileHandleDiagHandler::m_LowDiskSpace, CFileHandleDiagHandler::m_Messages, CFileHandleDiagHandler::m_ReopenTimer, NcbiSys_lseek, NcbiSys_write, NULL, CObject::RemoveReference(), CStopWatch::Restart(), s_LogSizeLimit, s_ReopenEntered, SEEK_CUR, str(), and CDiagContext::UpdatePID().

Referenced by CFileHandleDiagHandler::CFileHandleDiagHandler(), CFileHandleDiagHandler::Post(), and CFileHandleDiagHandler::WriteMessage().

◆ Reopen() [2/4]

Reopen file to enable log rotation.

Reimplemented from CDiagHandler.

Definition at line 7144 of file ncbidiag.cpp.

References CStopWatch::Elapsed(), CDiagHandler::fCheck, flags, CStopWatch::IsRunning(), kLogReopenDelay, CFileDiagHandler::m_Err, CFileDiagHandler::m_Log, CFileDiagHandler::m_Perf, CFileDiagHandler::m_ReopenTimer, CFileDiagHandler::m_Trace, CDiagHandler::Reopen(), CStopWatch::Restart(), and s_ReopenEntered.

Referenced by CFileDiagHandler::Post(), and CFileDiagHandler::WriteMessage().

◆ Reopen() [3/4] ◆ Reopen() [4/4] ◆ Reset() [1/2] void CRequestContext_PassThrough::Reset ( CTempString  name ) inline ◆ Reset() [2/2] void CRequestContext::Reset ( void  )

Reset all properties to the initial state.

Definition at line 274 of file request_ctx.cpp.

References map_checker< Container >::clear(), eDiagAppState_NotSet, CRequestContext::m_AppState, CRequestContext::m_PassThroughProperties, CRequestContext::m_ReqTimer, CStopWatch::Reset(), CRequestContext::UnsetBytesRd(), CRequestContext::UnsetBytesWr(), CRequestContext::UnsetClientIP(), CRequestContext::UnsetHitID(), CRequestContext::UnsetRequestID(), CRequestContext::UnsetRequestStatus(), CRequestContext::UnsetSessionID(), CRequestContext::x_CanModify(), and CRequestContext::x_LoadEnvContextProperties().

Referenced by SWorkerNodeJobContextImpl::ResetJobContext(), CRequestContext::StopRequest(), CCgiApplication::x_OnEvent(), and CPSGS_Dispatcher::x_PrintRequestStop().

◆ ResetIsConsoleFlag() void CNcbiDiag::ResetIsConsoleFlag ( void  ) const inline ◆ ResetIsMessageFlag() void CNcbiDiag::ResetIsMessageFlag ( void  ) const inline ◆ ResetIsNoteFlag() void CNcbiDiag::ResetIsNoteFlag ( void  ) const inline ◆ ResetLogRates() void CDiagContext::ResetLogRates ( void  ) private

Definition at line 1445 of file ncbidiag.cpp.

References CRequestRateControl::eDiscrete, CRequestRateControl::eErrCode, CDiagContext::eLogRate_App, CDiagContext::eLogRate_Err, CDiagContext::eLogRate_Trace, CDiagContext::GetLogRate_Limit(), CDiagContext::GetLogRate_Period(), CDiagContext::m_AppLogRC, CDiagContext::m_AppLogSuspended, CDiagContext::m_ErrLogRC, CDiagContext::m_ErrLogSuspended, CDiagContext::m_TraceLogRC, and CDiagContext::m_TraceLogSuspended.

◆ ResetPostFlags()

Clear specific post flags for the current message.

◆ s_EscapeNewlines() void SDiagMessage::s_EscapeNewlines ( stringbuf ) static ◆ s_UnescapeNewlines() void SDiagMessage::s_UnescapeNewlines ( stringbuf ) static ◆ SDiagErrCodeDescription() [1/2]

Destructor.

Parameters
message Message explanation Explanation of msg. severity Do not override if set to -1

Definition at line 3011 of file ncbidiag.hpp.

◆ SDiagErrCodeDescription() [2/2] SDiagErrCodeDescription::SDiagErrCodeDescription ( void  ) ◆ SDiagMessage() [1/3]

Copy constructor required to store the messages and flush them when the diagnostics setup is finished.

Definition at line 4687 of file ncbidiag.cpp.

◆ SDiagMessage() [2/3] ◆ SDiagMessage() [3/3] SDiagMessage::SDiagMessage ( EDiagSev  severity, const char *  buf, size_t  len, const char *  file = 0, size_t  line = 0, TDiagPostFlags  flags = eDPF_Default, const char *  prefix = 0, int  err_code = 0, int  err_subcode = 0, const char *  err_text = 0, const char *  module = 0, const char *  nclass = 0, const char *  function = 0  )

Initialize SDiagMessage fields.

Definition at line 4591 of file ncbidiag.cpp.

References buf, eDiagAppState_Request, eDiagAppState_RequestBegin, eDiagAppState_RequestEnd, ePostNumber_Increment, file, flags, SDiagMessage::GetAppState(), CRequestContext::GetAutoIncRequestIDOnPost(), CDiagContext::GetPID(), CDiagContext::GetProcessPostNumber(), CDiagContextThreadData::GetRequestContext(), CRequestContext::GetRequestID(), CDiagContextThreadData::GetThreadData(), CDiagContextThreadData::GetThreadPostNumber(), CDiagContextThreadData::GetTID(), len, SDiagMessage::m_Buffer, SDiagMessage::m_BufferLen, SDiagMessage::m_Class, SDiagMessage::m_ErrCode, SDiagMessage::m_ErrSubCode, SDiagMessage::m_ErrText, SDiagMessage::m_File, SDiagMessage::m_Flags, SDiagMessage::m_Function, SDiagMessage::m_Line, SDiagMessage::m_Module, SDiagMessage::m_PID, SDiagMessage::m_Prefix, SDiagMessage::m_ProcPost, SDiagMessage::m_RequestId, SDiagMessage::m_Severity, SDiagMessage::m_ThrPost, SDiagMessage::m_TID, and CRequestContext::SetRequestID().

Referenced by SDiagMessage::ParseDiagStream().

◆ SelectLastHitID() ◆ SelectLastSessionID() ◆ Serialize() string CRequestContext_PassThrough::Serialize ( EFormat  format ) const ◆ Set() ◆ SetAbortHandler() ◆ SetAction() void CDiagCollectGuard::SetAction ( EAction  action ) inline ◆ SetAllowedSessionIDFormat() ◆ SetAllPostFlags()

Set new post flags for the current message.

◆ SetApplogSeverityLocked() static void CDiagContext::SetApplogSeverityLocked ( bool  lock ) inlinestatic ◆ SetAppName() void CDiagContext::SetAppName ( const stringapp_name ) ◆ SetAppState() [1/3]

Set application state.

Application state is set globally and the thread's state is reset (for the current thread only). Request states are set for the current thread (request context) only.

Definition at line 2917 of file ncbidiag.cpp.

References ctx, eDiagAppState_AppBegin, eDiagAppState_AppEnd, eDiagAppState_AppRun, eDiagAppState_NotSet, eDiagAppState_Request, eDiagAppState_RequestBegin, eDiagAppState_RequestEnd, ERR_POST_X, CDiagContext::GetRequestContext(), CDiagContext::m_AppState, and Warning().

Referenced by CDiagContext::PrintRequestStart(), CDiagContext::PrintRequestStop(), CCgiApplication::Run(), CDiagContext::SetAppState(), CDiagContext::SetProperty(), CFastCgiApplicationMT::x_ProcessThreadedRequest(), and CFastCgiApplicationMT::x_RunFastCGI().

◆ SetAppState() [2/3] ◆ SetAppState() [3/3] ◆ SetAttribute() [1/3]

Implements ITracerSpan.

Definition at line 206 of file jaeger_tracer.cpp.

References ITracerSpan::eClientAddress, ITracerSpan::eClientPort, ITracerSpan::eRequestMethod, ITracerSpan::eServerAddress, ITracerSpan::eServerPort, ITracerSpan::eSessionId, ITracerSpan::eStatusCode, ITracerSpan::eStatusString, ITracerSpan::eUrl, CJaegerTracerSpan::m_Span, and rapidjson::value.

◆ SetAttribute() [2/3] ◆ SetAttribute() [3/3] ◆ SetAutoIncRequestIDOnPost() void CRequestContext::SetAutoIncRequestIDOnPost ( bool  enable ) inline ◆ SetAutoWrite() void CDiagContext::SetAutoWrite ( bool  value ) ◆ SetBadSessionIDAction() ◆ SetBytesRd() void CRequestContext::SetBytesRd ( Int8  bytes ) inline

Definition at line 945 of file request_ctx.hpp.

References CRequestContext::eProp_BytesRd, CRequestContext::m_BytesRd, CRequestContext::x_CanModify(), and CRequestContext::x_SetProp().

Referenced by CGRPCRequestLogger::CGRPCRequestLogger(), CNetScheduleHandler::OnClose(), CNetStorageHandler::OnClose(), CDiagContext::SetProperty(), CRequestContext::StartRequest(), CNCMessageHandler::x_CleanCmdResources(), CGRPCRequestLogger::x_Init(), CCgiApplication::x_OnEvent(), CNetStorageHandler::x_ProcessRead(), and CFastCgiApplicationMT::x_ProcessThreadedRequest().

◆ SetBytesWr() void CRequestContext::SetBytesWr ( Int8  bytes ) inline

Definition at line 974 of file request_ctx.hpp.

References CRequestContext::eProp_BytesWr, CRequestContext::m_BytesWr, CRequestContext::x_CanModify(), and CRequestContext::x_SetProp().

Referenced by CNetScheduleHandler::OnClose(), CNetStorageHandler::OnClose(), s_DoCleanLog(), CDiagContext::SetProperty(), CRequestContext::StartRequest(), CNCMessageHandler::x_CleanCmdResources(), CNetStorageHandler::x_OnData(), CCgiApplication::x_OnEvent(), CPSGS_Dispatcher::x_PrintRequestStop(), CFastCgiApplicationMT::x_ProcessThreadedRequest(), and CGRPCRequestLogger::~CGRPCRequestLogger().

◆ SetClass() [1/2] ◆ SetClass() [2/2] ◆ SetClientIP() void CRequestContext::SetClientIP ( const stringclient )

Definition at line 321 of file request_ctx.cpp.

References client, CRequestContext::eProp_ClientIP, ERR_POST_X, ip, NStr::IsIPAddress(), kBadIP, len, CRequestContext::m_ClientIP, NStr::TruncateSpaces_Unsafe(), CRequestContext::x_CanModify(), CRequestContext::x_Modify(), and CRequestContext::x_SetProp().

Referenced by CGRPCServerCallbacks::BeginRequest(), s_CreateDiagRequest(), CDiagContext::SetProperty(), SetSessionAndIPAndPHID(), CNCMessageHandler::x_AssignCmdParams(), CNetScheduleHandler::x_CreateConnContext(), CNetStorageHandler::x_CreateConnContext(), CNetScheduleHandler::x_LogCommandWithJob(), CNetScheduleHandler::x_OnCmdParserError(), CNetScheduleHandler::x_PrintCmdRequestStart(), SWorkerNodeJobContextImpl::x_RunJob(), and CCgiRequest::x_SetClientIpProperty().

◆ SetCollectSeverity() void CDiagCollectGuard::SetCollectSeverity ( EDiagSev  sev ) ◆ SetCustomAttribute() [1/3] ◆ SetCustomAttribute() [2/3] ◆ SetCustomAttribute() [3/3] ◆ SetCustomThreadSuffix() void CAsyncDiagHandler::SetCustomThreadSuffix ( const stringsuffix ) ◆ SetDefaultAutoIncRequestIDOnPost() void CRequestContext::SetDefaultAutoIncRequestIDOnPost ( bool  enable ) static ◆ SetDefaultClientIP() void CDiagContext::SetDefaultClientIP ( const stringclient_ip ) static

Set new default client ip.

This value is used only if by the time 'request start' is logged there's no explicit ip set in the current request context.

Definition at line 3040 of file ncbidiag.cpp.

References s_DefaultClientIp.

◆ SetDefaultErrorStatus() void CRequestContextGuard_Base::SetDefaultErrorStatus ( int  status ) ◆ SetDefaultHitID() void CDiagContext::SetDefaultHitID ( const stringhit_id ) ◆ SetDefaultSessionID() void CDiagContext::SetDefaultSessionID ( const stringsession_id ) ◆ SetDefaultSpanKind() void COpentelemetryTracer::SetDefaultSpanKind ( opentelemetry::trace::SpanKind  span_kind ) inline ◆ SetDescription()

Set error description for specified error code.

If description for this code already exist, then it will be overwritten.

Referenced by CDiagErrCodeInfo::Read().

◆ SetDiagDieLevel()

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].

Returns
Return previous die-level.

Definition at line 6301 of file ncbidiag.cpp.

References eDiag_Fatal, CDiagLock::eWrite, and NCBI_THROW.

◆ SetDiagErrCodeInfo() ◆ SetDiagFilter()

Set diagnostic filter.

Diagnostic filter acts as a second level filtering mechanism (the primary established by global error post level)

Parameters
what Filter is set for filter_str Filter string
See also
SetDiagPostLevel

Definition at line 7777 of file ncbidiag.cpp.

References eDiagFilter_All, eDiagFilter_Post, eDiagFilter_Trace, CDiagLock::eWrite, s_PostFilter, and s_TraceFilter.

Referenced by BOOST_AUTO_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), main(), CConnTestThread::Main(), s_CombineDustMasksWithUserProvidedMasks(), CLogLatencyReport::Start(), CNcbiApplicationAPI::x_HonorStandardSettings(), CBioseqIndex::x_InitFeats(), and CCdregionValidator::x_ValidateCDSPeptides().

◆ SetDiagFixedPostLevel() void SetDiagFixedPostLevel ( EDiagSev  post_sev ) ◆ SetDiagHandler() [1/2]

Set the diagnostic handler using the specified diagnostic handler class.

Definition at line 6393 of file ncbidiag.cpp.

References ctx, ePostNumber_NoIncrement, CDiagLock::eWrite, GetDiagContext(), CDiagHandler::GetLogName(), CDiagContext::GetProcessPostNumber(), and CDiagContext::SetApplogSeverityLocked().

Referenced by Cn3DApp::Cn3DApp(), CNcbiToolkitImpl_DiagHandler::CNcbiToolkitImpl_DiagHandler(), CCgiApplication::ConfigureDiagDestination(), CwxLogDiagHandler::CwxLogDiagHandler(), Cn3DNoWin::Exit(), Cn3DNoWin::Init(), CProjBulderApp::Init(), init_common(), CAsyncDiagHandler::InstallToDiag(), Cn3DApp::OnExit(), CAsyncDiagHandler::RemoveFromDiag(), CBlastnApp::Run(), CBlastpApp::Run(), CBlastxApp::Run(), CDeltaBlastApp::Run(), CPsiBlastApp::Run(), CTblastnApp::Run(), CTblastxApp::Run(), CTbl2AsnApp::Run(), s_RestoreOrigDiagHandler(), SetDiagHandler(), SetDiagStream(), SetLogFile(), CDiagContext::SetupDiag(), CLogLatencyReport::Start(), CRPSBlastApp::x_RunMTBySplitDB(), CRPSTBlastnApp::x_RunMTBySplitDB(), CRPSBlastApp::x_RunMTBySplitQuery(), CRPSTBlastnApp::x_RunMTBySplitQuery(), CBlastAppDiagHandler::~CBlastAppDiagHandler(), CDiagRecycler::~CDiagRecycler(), CDiagRestorer::~CDiagRestorer(), CLogLatencyReport::~CLogLatencyReport(), CNcbiToolkit::~CNcbiToolkit(), and CwxLogDiagHandler::~CwxLogDiagHandler().

◆ SetDiagHandler() [2/2] ◆ SetDiagPostAllFlags() ◆ SetDiagPostFlag()

Set the specified flag (globally).

Definition at line 6175 of file ncbidiag.cpp.

References s_SetDiagPostFlag().

Referenced by CCgiApplication::CCgiApplication(), Cn3DApp::Cn3DApp(), SGridWorkerNodeImpl::Init(), CCgiApplication::Init(), Cn3DNoWin::Init(), CBDB_PhoneBookDemo1::Init(), CBDB_PhoneBookDemo2::Init(), CBDB_PhoneBookDemo3::Init(), CBDB_BLobDemo1::Init(), CBDB_SplitTest::Init(), CBDB_MergeTest::Init(), CTestApplication::Init(), CSampleNetScheduleClient::Init(), CSampleNetScheduleNode::Init(), main(), CRemoteAppListener::OnInit(), CXcompareAnnotsApplication::Run(), BlastdbCopyApplication::Run(), CId1FetchApp::Run(), and CId2FetchApp::Run().

◆ SetDiagPostLevel()

Set the threshold severity for posting the messages.

This function has effect only if:

Another way to do filtering is to call SetDiagFilter

Parameters
post_sev Post only messages with severity greater or equal to "post_sev".

Special case: eDiag_Trace – print all messages and turn on the tracing.

Returns
Return previous post-level.
See also
SetDiagFilter(), SetDiagTrace()

Definition at line 6234 of file ncbidiag.cpp.

References eDiag_Info, eDiag_Trace, eDiagSC_Disable, eDiagSevMax, eDT_Enable, CDiagLock::eWrite, NCBI_THROW, and SetDiagTrace().

Referenced by UpdateViewer::BlastNeighbor(), BOOST_AUTO_TEST_CASE(), CAV_DisplayMultiple(), CDiagLevelGuard::CDiagLevelGuard(), Cn3DApp::Cn3DApp(), CCgiApplication::ConfigureDiagThreshold(), CreateMimeFromBiostruc(), BlockMultipleAlignment::ExtractRows(), GetStructureFromCacheFolder(), UpdateViewer::ImportStructure(), CReadresult::Init(), COMSSABase::Init(), COMSSAMerge::Init(), CCompactSAMApplication::Init(), CExonSelectorApplication::Init(), CUsageReportSampleApp::Init(), CNCBIwxApplication::Init(), CXcompareAnnotsApplication::Init(), Cn3DNoWin::Init(), CHgvsToSeqfeatConverter::Init(), CBDB_PhoneBookDemo1::Init(), CBDB_PhoneBookDemo2::Init(), CBDB_PhoneBookDemo3::Init(), CBDB_BLobDemo1::Init(), CBDB_SplitTest::Init(), CBDB_MergeTest::Init(), CTestApplication::Init(), CApp::Init(), CSampleNetScheduleClient::Init(), CSampleNetScheduleNode::Init(), CDataTool::Init(), LoadASNFromIstream(), LoadDataOnly(), main(), ReadCD(), CBasicFastaWrapper::ReadFile(), AlignmentManager::RealignDependentSequences(), CNgAlignApp::Run(), CMkIndexApplication::Run(), COMSSA::Run(), CBlastFormatterApp::Run(), CBlastnApp::Run(), CBlastpApp::Run(), CBlastxApp::Run(), CDeltaBlastApp::Run(), CPsiBlastApp::Run(), CSeedTopApp::Run(), CTblastnApp::Run(), CTblastxApp::Run(), CBlastdbConvertApp::Run(), CMakeBlastDBApp::Run(), CMakeClusterDBApp::Run(), CBlastVdbCmdApp::Run(), CGridCommandLineInterfaceApp::Run(), CIgBlastnApp::Run(), CIgBlastpApp::Run(), CMagicBlastApp::Run(), CRMBlastnApp::Run(), CVecScreenApp::Run(), CBlastKmerBuildIndexApplication::Run(), CMultiApplication::Run(), CAsn2Asn::Run(), BlastdbCopyApplication::Run(), CVDBBlastnApp::Run(), CVDBTblastnApp::Run(), CId1FetchApp::Run(), CId2FetchApp::Run(), CSplitCacheApp::Run(), CWig2tableApplication::Run(), CWinMaskApplication::Run(), CProjBulderApp::Run(), CBam2GraphApp::Run(), s_Dump(), s_DumpSparse(), s_DumpZero(), s_InitializeSubject(), SDiagRestorer::SDiagRestorer(), SetDiagFixedPostLevel(), CDiagContext::SetupDiag(), CTar::x_ReadEntryInfo(), CRPSBlastApp::x_RunMTBySplitDB(), CRPSTBlastnApp::x_RunMTBySplitDB(), CRPSBlastApp::x_RunMTBySplitQuery(), CRPSTBlastnApp::x_RunMTBySplitQuery(), CDiagLevelGuard::~CDiagLevelGuard(), and SDiagRestorer::~SDiagRestorer().

◆ SetDiagPostPrefix() void SetDiagPostPrefix ( const char *  prefix )

Specify a string to prefix all subsequent error postings with.

Definition at line 6202 of file ncbidiag.cpp.

References buf, and GetDiagBuffer().

Referenced by CBlastnNode::Main(), CBlastpNode::Main(), CBlastxNode::Main(), CRPSBlastNode::Main(), CRPSTBlastnNode::Main(), CTblastnNode::Main(), CBlastnApp::Run(), CBlastpApp::Run(), CBlastxApp::Run(), CDeltaBlastApp::Run(), CPsiBlastApp::Run(), CSeedTopApp::Run(), CTblastnApp::Run(), CTblastxApp::Run(), CBlastdbConvertApp::Run(), CMakeBlastDBApp::Run(), CMakeClusterDBApp::Run(), CBlastVdbCmdApp::Run(), CMagicBlastApp::Run(), CBlastKmerBuildIndexApplication::Run(), CBlastDbCheckApplication::Run(), BlastdbCopyApplication::Run(), CVDBBlastnApp::Run(), CVDBTblastnApp::Run(), CRPSBlastApp::x_RunMTBySplitDB(), CRPSTBlastnApp::x_RunMTBySplitDB(), CRPSBlastApp::x_RunMTBySplitQuery(), and CRPSTBlastnApp::x_RunMTBySplitQuery().

◆ SetDiagRequestId() void SetDiagRequestId ( Uint8  id ) ◆ SetDiagStream()

Set diagnostic stream.

Error diagnostics are written to output stream "os". This uses the SetDiagHandler() functionality.

Parameters
quick_flush Do stream flush after every message cleanup Call "cleanup(cleanup_data)" if diag. cleanup_data Stream is changed (see SetDiagHandler) stream_name Stream name (e.g. STDERR, file.log)

Definition at line 8190 of file ncbidiag.cpp.

References cleanup(), kLogName_Stderr, kLogName_Stdout, kLogName_Stream, NCBI_LSAN_DISABLE_GUARD, and SetDiagHandler().

Referenced by BOOST_AUTO_TEST_CASE(), CAV_DisplayMultiple(), CNcbiApplogApp::Cmd_Health(), CNCBIwxApplication::Exit(), CTestCompartApplication::Exit(), CDemoScoreBuilderApp::Exit(), CBlastInputDemoApplication::Exit(), CGumbelParamsApplication::Exit(), CBlastKmerApplication::Exit(), CBlastKmerBuildIndexApplication::Exit(), CClustererApplication::Exit(), CMultiApplication::Exit(), COmssa2pepxmlApplication::Exit(), CAgpValidateApplication::Exit(), CAgpconvertApplication::Exit(), CAsnCacheTestApplication::Exit(), CCacheIndexCopyApp::Exit(), CConcatSeqEntriesApplication::Exit(), CAsnCacheDumpSeqIdsApplication::Exit(), CPrimeCacheApplication::Exit(), CReadIndexSpeedApp::Exit(), CAsnSubCacheCreateApplication::Exit(), CWalkAsnCacheApplication::Exit(), CBlastDbCheckApplication::Exit(), BlastdbCopyApplication::Exit(), CConvert2BlastMaskApplication::Exit(), CGuideTreeApplication::Exit(), CVDBBlastnApp::Exit(), CVDBTblastnApp::Exit(), Cn3DNoWin::Exit(), CFeatImportApp::Exit(), CFormatGuessApp::Exit(), CId1FetchApp::Exit(), CId2FetchApp::Exit(), CNmer_repeatsApplication::Exit(), CObjExtractApp::Exit(), SegMaskerApplication::Exit(), CMytestApplication::Exit(), CStreamTestApp::Exit(), CObjConvProfile::Exit(), CAppJobTestApplication::Exit(), CTestDispatchApp::Exit(), CColumnarVCFReaderApp::Exit(), CBam2GraphApp::Exit(), CConvImageApp::Exit(), CImageDemoApp::Exit(), CSubImageApp::Exit(), CNcbiApplicationAPI::FlushDiag(), main(), Cn3DApp::OnExit(), CTbl2AsnApp::ProcessOneFile(), CNcbiApplogApp::Run(), CAsn2Asn::Run(), CId1FetchApp::Run(), CId2FetchApp::Run(), CAlnVwrApp::Run(), SetLogFile(), CAlnMrgApp::SetOptions(), and CDiagContext::SetupDiag().

◆ SetDiagTrace()

Set the diagnostic trace settings.

Definition at line 6331 of file ncbidiag.cpp.

References eDT_Default, eDT_Enable, and CDiagLock::eWrite.

Referenced by CNcbiApplicationAPI::AppMain(), Cn3DApp::Cn3DApp(), CCgiApplication::ConfigureDiagThreshold(), GetAsnDataViaHTTP(), Cn3DNoWin::Init(), CBDB_SplitTest::Init(), CBDB_MergeTest::Init(), CTestApplication::Init(), main(), ReadASNFromFile(), CGridCommandLineInterfaceApp::Run(), CXcompareAnnotsApplication::Run(), CWinMaskDemoApplication::Run(), SetDiagPostLevel(), WriteASNToFile(), and CNcbiApplicationAPI::x_HonorStandardSettings().

◆ SetDiagTraceAllFlags() ◆ SetDiagTraceFlag() ◆ SetDiagUserAndHost()

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(), ctx, fDiag_AddHost, fDiag_AddUser, fDiag_OverrideExisting, flags, GetDiagContext(), CSocketAPI::gethostname(), CDiagContext::SetHostname(), and CDiagContext::SetUsername().

Referenced by SNetScheduleAPIImpl::Init(), and CGridCommandLineInterfaceApp::Run().

◆ SetDisabledAppLog() void CRequestContext::SetDisabledAppLog ( bool  disable ) inline ◆ SetDisabledAppLogEvents() ◆ SetDoubleDiagHandler() void SetDoubleDiagHandler ( void  ) ◆ SetDtab() ◆ SetErrorCode() ◆ SetExitCode() void CDiagContext::SetExitCode ( int  exit_code ) inline ◆ SetExitSignal() void CDiagContext::SetExitSignal ( int  exit_sig ) inline ◆ SetFastCGIIteration() void SetFastCGIIteration ( Uint8  id ) inline ◆ SetFile() [1/2] ◆ SetFile() [2/2] ◆ SetFunction() [1/2] ◆ SetFunction() [2/2] void CDiagCompileInfo::SetFunction ( const stringfunc ) private ◆ SetGlobalAppState() ◆ SetHitID() [1/2] ◆ SetHitId() ◆ SetHitID() [2/2] ◆ SetHostIP() ◆ SetHostname() void CDiagContext::SetHostname ( const stringhostname ) ◆ SetHttpHeader() [1/3] ◆ SetHttpHeader() [2/3] ◆ SetHttpHeader() [3/3] ◆ SetLine() [1/2] void CDiagCompileInfo::SetLine ( int  line ) private ◆ SetLine() [2/2] ◆ SetLogFile() [1/2]

Set new log file.

Parameters
file_name File name. If file_type is eDiagFile_All, the output will be written to file_name.(err|log|trace). Otherwise the filename is used as-is. Special filenames are: "" - disable diag messages; "-" - print to stderr "/dev/null" - never add .(err|log|trace) to the name. file_type Type of log file to set - error, trace or application log. quick_flush Do stream flush after every message.

Definition at line 6989 of file ncbidiag.cpp.

References eDiagFile_All, eDiagFile_Err, eDiagFile_Log, eDiagFile_Perf, eDiagFile_Trace, err_handler(), file_name, file_type, CDirEntry::GetBase(), CDirEntry::GetDir(), CDirEntry::GetExt(), kLogName_None, kLogName_Stderr, CFileDiagHandler::m_Err, CFileDiagHandler::m_Log, CFileDiagHandler::m_OwnErr, CFileDiagHandler::m_OwnLog, CFileDiagHandler::m_OwnPerf, CFileDiagHandler::m_OwnTrace, CFileDiagHandler::m_Perf, CFileDiagHandler::m_ReopenTimer, CFileDiagHandler::m_Trace, CStopWatch::Restart(), s_CreateHandler(), s_IsSpecialLogName(), s_SplitLogFile, CFileDiagHandler::SetLogName(), and CFileDiagHandler::x_SetHandler().

Referenced by CFileDiagHandler::CFileDiagHandler().

◆ SetLogFile() [2/2]

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 7635 of file ncbidiag.cpp.

References eDiagFile_All, ERR_POST_X, file_name, file_type, GetDiagHandler(), CDirEntry::GetDir(), Info(), kLogName_None, kLogName_Stderr, NcbiCerr, s_IsSpecialLogName(), s_SplitLogFile, CDiagContext::SetApplogSeverityLocked(), SetDiagHandler(), SetDiagStream(), and SetSplitLogFile().

Referenced by OpenLogFileFromConfig(), CDiagContext::SetupDiag(), and CAsnvalApp::x_AliasLogFile().

◆ SetLogName() [1/3] void CStreamDiagHandler_Base::SetLogName ( const stringlog_name ) protected ◆ SetLogName() [2/3] void CFileHandleDiagHandler::SetLogName ( const stringlog_name ) protectedvirtual ◆ SetLogName() [3/3] void CFileDiagHandler::SetLogName ( const stringlog_name ) protectedvirtual ◆ SetLogRate_Limit()

Definition at line 1482 of file ncbidiag.cpp.

References CRequestRateControl::eDiscrete, CRequestRateControl::eErrCode, CDiagContext::eLogRate_App, CDiagContext::eLogRate_Err, CDiagContext::eLogRate_Trace, CDiagContext::GetLogRate_Period(), CDiagContext::m_AppLogRC, CDiagContext::m_AppLogSuspended, CDiagContext::m_ErrLogRC, CDiagContext::m_ErrLogSuspended, CDiagContext::m_TraceLogRC, CDiagContext::m_TraceLogSuspended, s_AppLogRateLimit, s_ErrLogRateLimit, and s_TraceLogRateLimit.

Referenced by NcbiSys_main().

◆ SetLogRate_Period() void CDiagContext::SetLogRate_Period ( ELogRate_Type  type, unsigned int  period  )

Definition at line 1536 of file ncbidiag.cpp.

References CRequestRateControl::eDiscrete, CRequestRateControl::eErrCode, CDiagContext::eLogRate_App, CDiagContext::eLogRate_Err, CDiagContext::eLogRate_Trace, CDiagContext::GetLogRate_Limit(), CDiagContext::m_AppLogRC, CDiagContext::m_AppLogSuspended, CDiagContext::m_ErrLogRC, CDiagContext::m_ErrLogSuspended, CDiagContext::m_TraceLogRC, CDiagContext::m_TraceLogSuspended, s_AppLogRatePeriod, s_ErrLogRatePeriod, and s_TraceLogRatePeriod.

◆ SetLogTruncate() void CDiagContext::SetLogTruncate ( bool  value ) static ◆ SetModule() [1/2] ◆ SetModule() [2/2] void CDiagCompileInfo::SetModule ( const stringmodule ) private ◆ SetName() [1/3] void CJaegerTracerSpan::SetName ( const stringname ) inlineoverridevirtual ◆ SetName() [2/3] void COpentelemetryTracerSpan::SetName ( const stringname ) overridevirtual ◆ SetName() [3/3] ◆ SetOldPostFormat() void CDiagContext::SetOldPostFormat ( bool  value ) static ◆ SetOmitStackTrace() void CNcbiDiag::SetOmitStackTrace ( bool  value ) inline ◆ SetON() void CPerfLogger::SetON ( bool  enable = true ) static

Turn performance logging on/off globally.

Definition at line 64 of file perf_log.cpp.

◆ SetOwnership() ◆ SetPostFlags() [1/2] ◆ SetPostFlags() [2/2]

Set specific post flags for the current message.

◆ SetPrintSeverity() void CDiagCollectGuard::SetPrintSeverity ( EDiagSev  sev ) ◆ SetProperty() [1/2] ◆ SetProperty() [2/2]

Set application context property by name.

Write property to the log if AutoPrint flag is set. Property mode defines if the property is a global or a per-thread one. By default unknown properties are set as thread-local.

Deprecated:

Definition at line 2033 of file ncbidiag.cpp.

References SDiagMessage::eEvent_Extra, CDiagContext::eProp_Default, CDiagContext::eProp_Global, CDiagContext::eProp_Thread, CDiagLock::eRead, CDiagLock::eWrite, NStr::fConvErr_NoThrow, CDiagContext::GetRequestContext(), IsGlobalProperty(), CDiagContext::kProperty_AppName, CDiagContext::kProperty_AppState, CDiagContext::kProperty_BytesRd, CDiagContext::kProperty_BytesWr, CDiagContext::kProperty_ClientIP, CDiagContext::kProperty_ExitCode, CDiagContext::kProperty_ExitSig, CDiagContext::kProperty_HostIP, CDiagContext::kProperty_HostName, CDiagContext::kProperty_ReqStatus, CDiagContext::kProperty_ReqTime, CDiagContext::kProperty_SessionID, CDiagContext::kProperty_UserName, CDiagContext::m_Properties, s_AutoWrite_Context, s_StrToAppState(), CDiagContext::SetAppName(), CDiagContext::SetAppState(), CRequestContext::SetBytesRd(), CRequestContext::SetBytesWr(), CRequestContext::SetClientIP(), CDiagContext::SetExitCode(), CDiagContext::SetExitSignal(), CDiagContext::SetHostIP(), CDiagContext::SetHostname(), CRequestContext::SetRequestStatus(), CRequestContext::SetSessionID(), CDiagContext::SetUsername(), CDiagContext::sm_Instance, NStr::StringToInt(), NStr::StringToInt8(), CRequestContext::UnsetRequestStatus(), rapidjson::value, and CDiagContext::x_PrintMessage().

◆ SetReadOnly() void CRequestContext::SetReadOnly ( bool  read_only ) inline

Switch request context to read-only mode.

A read-only context can be attached to multiple threads. The mode must be disabled before making any modifications (e.g. printing request-stop). To avoid overhead CRequestContext does not check if there are any threads currently using the same context in a different mode. Any attempts to modify request context while in read-only mode are ignored and reported as an error (once per process). Note that some const methods may still need to modify the context (e.g. GetHitID() generates a new hit id if it's not yet assigned). To prevent the above error from being logged, the method should be called at least once before switching to read-only mode.

Definition at line 416 of file request_ctx.hpp.

References CRequestContext::m_IsReadOnly.

Referenced by CPSGS_Request::SetRequestContext(), and CPubseqGatewayApp::x_SelfZEndPointCheckImpl().

◆ SetRequestContext()

Shortcut to CDiagContextThreadData::GetThreadData().SetRequestContext()

Definition at line 2009 of file ncbidiag.cpp.

References ctx, CDiagContextThreadData::GetThreadData(), and CDiagContextThreadData::SetRequestContext().

Referenced by CNSClientsRegistry::ClearOnTimeout(), CreateErrorRequestContext(), CRequestContextSwitcher::CRequestContextSwitcher(), DismissErrorRequestContext(), SAsyncWriteTask::Execute(), CNetScheduleServer::Exit(), CNetScheduleHandler::OnClose(), CNetStorageHandler::OnClose(), CNetStorageHandler::OnOverflow(), CNetStorageHandler::OnRead(), CStatisticsCounters::PrintServerWide(), CQueue::PrintStatistics(), CRequestContextSwitcher::Release(), CRequestContextGuard_Base::Release(), CNetStorageGCDatabase::RemoveObject(), SPSG_Request::SContext::Set(), CPSGS_Request::SetRequestContext(), SNewRequestContext::SNewRequestContext(), CThread::Wrapper(), CNetScheduleHandler::x_CreateConnContext(), CNetStorageHandler::x_CreateConnContext(), CPubseqGatewayApp::x_CreateRequestContext(), CPubseqGatewayApp::x_DispatchRequest(), CGetJobNotificationThread::x_DoJob(), CJobQueueCleanerThread::x_DoJob(), CJobQueueExecutionWatcherThread::x_DoJob(), CNetScheduleHandler::x_PrintCmdRequestStart(), CNetScheduleHandler::x_PrintCmdRequestStop(), CNetStorageHandler::x_PrintMessageRequestStart(), CNetStorageHandler::x_PrintMessageRequestStop(), CPubseqGatewayApp::x_PrintRequestStop(), CPSGS_Dispatcher::x_PrintRequestStop(), CNetScheduleHandler::x_ProcessMsgBatchSubmit(), CNetScheduleHandler::x_ProcessMsgRequest(), CNetStorageGCApp::x_RemoveObjects(), CGraphCache< TData >::x_Run(), CNetScheduleHandler::x_SetRequestContext(), CNcbiApplicationAPI::x_TryMain(), CRequestContextResetter::~CRequestContextResetter(), and SNewRequestContext::~SNewRequestContext().

◆ SetRequestID() [1/2] void CRequestContext::SetRequestID ( TCount  rid ) inline

Set request ID.

Definition at line 721 of file request_ctx.hpp.

References CRequestContext::eProp_RequestID, CRequestContext::m_RequestID, CRequestContext::x_CanModify(), CRequestContext::x_Modify(), and CRequestContext::x_SetProp().

Referenced by CGRPCServerCallbacks::BeginRequest(), CDiagContextThreadData::IncRequestId(), SDiagMessage::SDiagMessage(), SetDiagRequestId(), CDiagContextThreadData::SetRequestId(), SNewRequestContext::SNewRequestContext(), CNetScheduleHandler::x_CreateConnContext(), CNetStorageHandler::x_CreateConnContext(), CExpiredCleaner::x_DeleteNextData(), CBulkCleaner::x_Finalize(), CNetStorageHandler::x_PrintMessageRequestStart(), CNetScheduleHandler::x_ProcessMsgRequest(), SWorkerNodeJobContextImpl::x_RunJob(), and SOfflineJobContextImpl::x_RunJob().

◆ SetRequestID() [2/2] ◆ SetRequestStatus() [1/2] ◆ SetRequestStatus() [2/2] void CRequestContext::SetRequestStatus ( int  status ) inline

Definition at line 909 of file request_ctx.hpp.

References CRequestContext::eProp_ReqStatus, CRequestContext::m_ReqStatus, CRequestContext::x_CanModify(), and CRequestContext::x_SetProp().

Referenced by CNcbiTestsObserver::assertion_result(), CNetScheduleHandler::OnClose(), CNetStorageHandler::OnClose(), CNetScheduleHandler::OnMessage(), CNetScheduleHandler::OnTimeout(), CNetStorageHandler::OnTimeout(), CPrimeCacheApplication::Run(), CAsnSubCacheCreateApplication::Run(), CCgiApplication::SetHTTPStatus(), CCgiRequestProcessor::SetHTTPStatus(), CDiagContext::SetProperty(), CRequestContext::SetRequestStatus(), CRequestContextGuard_Base::SetStatus(), CCgiResponse::SetStatus(), CBlobCacher::x_CancelCaching(), CNCMessageHandler::x_CloseCmdAndConn(), CNCMessageHandler::x_CloseOnPeerError(), CNetScheduleHandler::x_CreateConnContext(), CNetStorageHandler::x_CreateConnContext(), CBlobCacher::x_DelFileAndRetryCreate(), CNCMessageHandler::x_DoCmd_CopyProlong(), CNCMessageHandler::x_DoCmd_CopyPut(), CNCMessageHandler::x_DoCmd_Get(), CNCMessageHandler::x_DoCmd_GetStat(), CNCMessageHandler::x_DoCmd_HasBlob(), CNCMessageHandler::x_DoCmd_IC_Store(), CNCMessageHandler::x_DoCmd_Put(), CNCMessageHandler::x_DoCmd_ReConfig(), CNCMessageHandler::x_DoCmd_SetValid(), CNCMessageHandler::x_DoCmd_SyncGet(), CNCMessageHandler::x_DoCmd_SyncStart(), CSpaceShrinker::x_FinishMoves(), CNCMessageHandler::x_FinishReadingBlob(), CNCActiveSyncControl::x_FinishSync(), CNetScheduleHandler::x_HandleSocketErrorOnResponse(), CCgiApplication::x_OnEvent(), CNetStorageHandler::x_OnSocketWriteError(), CNetScheduleHandler::x_PrintCmdRequestStart(), CNetStorageHandler::x_PrintMessageRequestStart(), SWorkerNodeJobContextImpl::x_PrintRequestStop(), CPSGS_Dispatcher::x_PrintRequestStop(), CNetScheduleHandler::x_ProcessMsgRequest(), CNCActiveHandler::x_ProcessPeerError(), CNCMessageHandler::x_ProxyToNextPeer(), CNCMessageHandler::x_ReadAuthMessage(), CNCMessageHandler::x_ReadBlobChunk(), CNCMessageHandler::x_ReadBlobChunkLength(), CNCMessageHandler::x_ReadBlobSignature(), CNCMessageHandler::x_ReadCommand(), CNCMessageHandler::x_ReportError(), CNetScheduleHandler::x_SetCmdRequestStatus(), CNetStorageHandler::x_SetCmdRequestStatus(), CNetScheduleHandler::x_SetConnRequestStatus(), CNetStorageHandler::x_SetConnRequestStatus(), CNCMessageHandler::x_StartCommand(), CNCMessageHandler::x_WaitForPeerAnswer(), CNCMessageHandler::x_WriteBlobData(), and CRequestContextGuard_Base::~CRequestContextGuard_Base().

◆ SetRequestTracer() ◆ SetSessionID() [1/2] void CRequestContext::SetSessionID ( const stringsession )

Definition at line 472 of file request_ctx.cpp.

References CRequestContext::eOnBadSID_Allow, CRequestContext::eOnBadSID_AllowAndReport, CRequestContext::eOnBadSID_Ignore, CRequestContext::eOnBadSID_IgnoreAndReport, CRequestContext::eOnBadSID_Throw, CRequestContext::eProp_SessionID, ERR_POST_X, CRequestContext::GetBadSessionIDAction(), CRequestContext::IsValidSessionID(), CRequestContext::m_SessionID, NCBI_THROW, CEncodedString::SetString(), Warning(), CRequestContext::x_CanModify(), CRequestContext::x_Modify(), and CRequestContext::x_SetProp().

Referenced by SNSCommandArguments::AssignValues(), CCgiContext::RetrieveTrackingId(), SGridWorkerNodeImpl::Run(), s_GetRequestID(), CDiagContext::SetProperty(), SetSessionAndIPAndPHID(), CNCMessageHandler::x_AssignCmdParams(), CNetScheduleHandler::x_LogCommandWithJob(), CNetScheduleHandler::x_PrintCmdRequestStart(), and SWorkerNodeJobContextImpl::x_RunJob().

◆ SetSessionID() [2/2] ◆ SetSeverityCap() void CDiagCollectGuard::SetSeverityCap ( EDiagSev  sev ) inline ◆ SetShared() void CSharedHitId::SetShared ( void  ) const inline ◆ SetSpanStatus() [1/3] void CJaegerTracerSpan::SetSpanStatus ( ESpanStatus  status ) overridevirtual ◆ SetSpanStatus() [2/3] void COpentelemetryTracerSpan::SetSpanStatus ( ESpanStatus  status ) overridevirtual ◆ SetSpanStatus() [3/3] ◆ SetSplitLogFile() void SetSplitLogFile ( bool  value = true ) ◆ SetSrcTraceParent() void CRequestContext::SetSrcTraceParent ( const stringparent ) inline ◆ SetSrcTraceState() void CRequestContext::SetSrcTraceState ( const stringstate ) inline ◆ SetStatus() void CRequestContextGuard_Base::SetStatus ( int  status ) inline ◆ SetSubHandler()

Definition at line 7121 of file ncbidiag.cpp.

References eDiagFile_All, eDiagFile_Err, eDiagFile_Log, eDiagFile_Perf, eDiagFile_Trace, file_type, CFileDiagHandler::m_Err, CFileDiagHandler::m_Log, CFileDiagHandler::m_OwnErr, CFileDiagHandler::m_OwnLog, CFileDiagHandler::m_OwnPerf, CFileDiagHandler::m_OwnTrace, CFileDiagHandler::m_Perf, CFileDiagHandler::m_Trace, and CFileDiagHandler::x_SetHandler().

◆ SetTracerSpan() ◆ SetTracerSpanKind() ◆ SetType() ◆ SetupDiag()

Application-wide diagnostics setup.

Attempts to create log files or diag streams according to the 'ds' flag. If 'config' is set, gets name of the log file from the registry.

Definition at line 3647 of file ncbidiag.cpp.

References _ASSERT, _TRACE_X, CDirEntry::ConcatPath(), ctx, eDCM_Discard, eDCM_Flush, eDCM_Init, eDCM_InitNoLimit, eDCM_NoChange, eDiag_Warning, eDiagFile_All, eDiagSC_Unknown, eDS_AppSpecific, eDS_Default, eDS_Disable, eDS_ToMemory, eDS_ToStderr, eDS_ToStdlog, eDS_ToStdout, eDS_ToSyslog, eDS_User, CDiagContext::eLogRate_App, CDiagContext::eLogRate_Err, CDiagContext::eLogRate_Trace, CParamBase::EnableConfigDump(), ERR_POST_X, CDiagLock::eWrite, GetBase(), CDirEntry::GetBase(), GetDefaultLogLocation(), GetDiagContext(), GetDiagHandler(), CDiagHandler::GetLogName(), CDiagContext::GetLogTruncate(), CNcbiApplicationAPI::GetProgramExecutablePath(), CNcbiApplicationAPI::InstanceGuard(), kEmptyStr, kLogName_Memory, kLogName_None, kLogName_Stderr, kLogName_Stdout, CSysLog::kLogName_Syslog, kLogName_Tee, CRequestRateControl::kNoLimit, kRootLog, NCBI_LSAN_DISABLE_GUARD, CDirEntry::NormalizePath(), NStr::NumericToString(), OpenLogFileFromConfig(), s_GetLogConfigBool(), s_GetLogConfigString(), s_LogSizeLimit, CDiagContext::SetApplogSeverityLocked(), SetDiagHandler(), SetDiagPostLevel(), SetDiagStream(), SetLogFile(), and Warning().

Referenced by CNcbiApplicationAPI::AppMain(), InitDiagHandler(), CNcbiApplicationAPI::SetupDiag(), CNcbiApplicationAPI::SetupDiag_AppSpecific(), CDiagContext::SetUseRootLog(), and CNcbiApplicationAPI::x_TryInit().

◆ SetUsername() void CDiagContext::SetUsername ( const stringusername ) ◆ SetUseRootLog() void CDiagContext::SetUseRootLog ( void  ) static ◆ Severity() ◆ SeverityName()

Get a common symbolic name for the severity levels.

Referenced by CJsonResponse::AddMessage(), CPSGS_CassProcessorBase::CountError(), CFlatFileMessage::Dump(), CAnnotWriterLogger::DumpMessage(), CMessageHandlerDefault::HandleMessage(), COpentelemetryTracerSpan::PostEvent(), s_GetSeverityName(), ILineError::SeverityStr(), CDB_Exception::SeverityString(), SeverityToLowerString(), sGetSeverityName(), CNcbiDiag::StrToSeverityLevel(), CMessage_Basic::Write(), CObjtoolsDiagMessage::WriteAsXML(), CObjEditMessage::x_GetSeverityString(), SDiagMessage::x_NewWrite(), SDiagMessage::x_OldWrite(), and CReportLoaderErrorsEx::x_UpdateHTMLResults().

◆ Start() [1/2] void CPerfLogger::Start ( void  ) inline

Activate and start (or, restart after Suspend()) the timer.

Note
If the timer is already running, post an error (once).
See also
Suspend

Definition at line 397 of file perf_log.hpp.

References ERR_POST_ONCE, Error(), CStopWatch::eStart, GetFastLocalTime(), CTime::IsEmpty(), CPerfLogger::IsON(), CPerfLogger::m_FirstStartTime, CPerfLogger::m_LastStartTime, CPerfLogger::m_StopWatch, CPerfLogger::m_TimerState, CStopWatch::Start(), and CPerfLogger::x_CheckValidity().

Referenced by CPerfLogger::CPerfLogger(), and CPerfLogGuard::Start().

◆ Start() [2/2] void CPerfLogGuard::Start ( void  ) inline ◆ StartRequest() void CRequestContext::StartRequest ( void  ) private

Definition at line 355 of file request_ctx.cpp.

References CRequestContext::fResetOnStart, CRequestContext::GetRequestTimer(), CRequestContext::m_Flags, CRequestContext::m_IsRunning, CRequestContext::m_Tracer, CStopWatch::Restart(), CRequestContext::SetBytesRd(), CRequestContext::SetBytesWr(), CRequestContext::sm_Tracer, CRequestContext::UnsetRequestStatus(), CRequestContext::x_CanModify(), CRequestContext::x_LoadEnvContextProperties(), and CRequestContext::x_LogHitID().

◆ StopRequest() void CRequestContext::StopRequest ( void  ) private ◆ StrToSeverityLevel()

Get severity from string.

Parameters
str_sev Can be the numeric value or a symbolic name (see CDiagBuffer::sm_SeverityName[]). sev Severity level.
Returns
Return TRUE if severity level known; FALSE, otherwise.

Definition at line 8011 of file ncbidiag.cpp.

References NStr::CompareNocase(), eDiagSevMax, eDiagSevMin, CNcbiDiag::SeverityName(), and NStr::StringToNonNegativeInt().

Referenced by CNcbiApplicationAPI::AppMain(), SDiagMessage::ParseMessage(), s_ParseErrCodeInfoStr(), NParamsBuilder::SBase< SPerformanceParams >::SBase(), CNcbiApplicationAPI::x_HonorStandardSettings(), and CNcbiEncrypt::x_LoadKeys().

◆ Suspend() [1/2] void CPerfLogger::Suspend ( void  ) inline

Suspend the timer.

Call Start() to continue to count time accured before.

See also
Start

Definition at line 420 of file perf_log.hpp.

References CTime::DiffTimeSpan(), CStopWatch::eStop, CTimeSpan::GetAsDouble(), GetFastLocalTime(), CPerfLogger::IsON(), CPerfLogger::m_Elapsed, CPerfLogger::m_LastStartTime, CPerfLogger::m_StopWatch, CPerfLogger::m_TimerState, CStopWatch::Stop(), and CPerfLogger::x_CheckValidity().

Referenced by CPerfLogger::Post(), and CPerfLogGuard::Suspend().

◆ Suspend() [2/2] void CPerfLogGuard::Suspend ( void  ) inline ◆ sx_GetContextFieldsMask() const CMask & CRequestContext::sx_GetContextFieldsMask ( void  ) staticprivate ◆ sx_GetDefaultAutoIncRequestIDOnPost() bool & CRequestContext::sx_GetDefaultAutoIncRequestIDOnPost ( void  ) staticprivate ◆ sx_NormalizeContextPropertyName() ◆ sx_ThreadDataTlsCleanup() ◆ UnsetBytesRd() void CRequestContext::UnsetBytesRd ( void  ) inline ◆ UnsetBytesWr() void CRequestContext::UnsetBytesWr ( void  ) inline ◆ UnsetClientIP() void CRequestContext::UnsetClientIP ( void  ) inline ◆ UnsetDiagPostFlag() ◆ UnsetDiagTraceFlag() ◆ UnsetDtab() void CRequestContext::UnsetDtab ( void  ) inline ◆ UnsetHitID() void CRequestContext::UnsetHitID ( void  ) inline ◆ UnsetProperty() void CRequestContext::UnsetProperty ( const stringname ) ◆ UnsetRequestID() void CRequestContext::UnsetRequestID ( void  ) inline ◆ UnsetRequestStatus() void CRequestContext::UnsetRequestStatus ( void  ) inline ◆ UnsetSessionID() void CRequestContext::UnsetSessionID ( void  ) inline ◆ UpdateOnFork()

Update diagnostics after fork().

Updates PID if necessary (in the child process). If PID has not changed (parent process), no other actions are performed. For this reason the method will not do anything after the first call, since no PID changes will be detected.

Warning
The program can be built using multithreaded configurations, but for safety it should have a single thread before fork(). Only in this case it is safe to use any code in the child process.
If your program runs many threads and you call fork() one of them, it is safe to use async-safe calls only, otherwise you can get a dedlock, especially if you use thread locking methods and synchronizations, like mutexes and etc. Diag API is not async-safe, because use strings, memory allocations, streams and etc. Also, in such cases you need to use fOnFork_AsyncSafe flag to use async safe operations only inside this method. Note that this flag disable some initialization of the Diag API after forking.
See also
UpdatePID(), UpdatePID_AsyncSafe(), CCurrentProcess::GetThreadCount(), CCurrentProcess::Fork()

Definition at line 826 of file logging.cpp.

References CDiagContext::UpdatePID().

Referenced by CCurrentProcess::Fork().

◆ UpdatePID() bool CDiagContext::UpdatePID ( void  ) static

Reset PID cache (e.g. after fork). Return true if PID was updated.

Definition at line 832 of file logging.cpp.

References i, NULL, CSrvDiagMsg::PrintExtra(), CSrvDiagMsg::PrintParam(), s_AppUID, s_InitConstants(), s_InitLogPrefix(), s_MainData, s_MaxRunningThreads, s_Threads, and thr.

Referenced by CFileHandleDiagHandler::Reopen(), and CDiagContext::UpdateOnFork().

◆ UpdatePID_AsyncSafe() bool CDiagContext::UpdatePID_AsyncSafe ( void  ) static ◆ UpdateUID()

Take the source UID and replace its timestamp part with the current time.

If the source UID is 0, use the one from the diag context.

Definition at line 1804 of file ncbidiag.cpp.

References CDiagContext::GetUID(), and t.

◆ UseSystemThreadId() void CDiagContext::UseSystemThreadId ( bool  value = true ) static ◆ Valid() bool CFileHandleDiagHandler::Valid ( void  ) inline ◆ Write() [1/2] ◆ Write() [2/2] ◆ WriteMessage() [1/3] ◆ WriteMessage() [2/3] void CFileHandleDiagHandler::WriteMessage ( const char *  buf, size_t  len, EDiagFileType  file_type  ) virtual

Write string to the log.

The string may contain multiple messages of the same type.

Reimplemented from CDiagHandler.

Definition at line 6781 of file ncbidiag.cpp.

References buf, CStopWatch::Elapsed(), CDiagHandler::fDefault, CDiagFileHandleHolder::GetHandle(), CStopWatch::IsRunning(), kLogReopenDelay, len, CFileHandleDiagHandler::m_Handle, CFileHandleDiagHandler::m_ReopenTimer, NcbiSys_write, CFileHandleDiagHandler::Reopen(), and s_ReopenEntered.

◆ WriteMessage() [3/3] void CFileDiagHandler::WriteMessage ( const char *  buf, size_t  len, EDiagFileType  file_type  ) virtual

Write string to the log.

The string may contain multiple messages of the same type.

Reimplemented from CDiagHandler.

Definition at line 7248 of file ncbidiag.cpp.

References buf, CStopWatch::Elapsed(), CDiagHandler::fDefault, file_type, CStopWatch::IsRunning(), kLogReopenDelay, len, CFileDiagHandler::m_ReopenTimer, CFileDiagHandler::Reopen(), s_ReopenEntered, and CFileDiagHandler::x_GetHandler().

◆ WriteStdPrefix()

Write standard prefix to the stream.

Use values from the message (PID/TID/RID etc.).

Definition at line 3265 of file ncbidiag.cpp.

References client, CDiagContext::GetStringUID(), kDiagTimeFormat, kDiagW_AppState, kDiagW_Client, kDiagW_Host, kDiagW_PID, kDiagW_RID, kDiagW_Session, kDiagW_SN, kDiagW_TID, kUnknown_App, kUnknown_Client, kUnknown_Host, kUnknown_Session, msg(), and s_AppStateToStr().

Referenced by SDiagMessage::x_NewWrite().

◆ x_CanModify() bool CRequestContext::x_CanModify ( void  ) const inlineprivate

Definition at line 1042 of file request_ctx.hpp.

References ERR_POST_ONCE, and CRequestContext::m_IsReadOnly.

Referenced by CRequestContext::AddPassThroughProperty(), CRequestContext::GetNextSubHitID(), CRequestContext::Reset(), CRequestContext::SetAppState(), CRequestContext::SetBytesRd(), CRequestContext::SetBytesWr(), CRequestContext::SetClientIP(), CRequestContext::SetDtab(), CRequestContext::SetHitID(), CRequestContext::SetProperty(), CRequestContext::SetRequestID(), CRequestContext::SetRequestStatus(), CRequestContext::SetSessionID(), CRequestContext::StartRequest(), CRequestContext::StopRequest(), CRequestContext::UnsetBytesRd(), CRequestContext::UnsetBytesWr(), CRequestContext::UnsetClientIP(), CRequestContext::UnsetDtab(), CRequestContext::UnsetHitID(), CRequestContext::UnsetProperty(), CRequestContext::UnsetRequestID(), CRequestContext::UnsetRequestStatus(), CRequestContext::UnsetSessionID(), CRequestContext::x_GetHitID(), CRequestContext::x_LoadEnvContextProperties(), CRequestContext::x_ResetPassThroughProp(), CRequestContext::x_SetHitID(), and CRequestContext::x_SetPassThroughProp().

◆ x_CanPrint() bool CDiagContext_Extra::x_CanPrint ( void  ) private ◆ x_CheckValidity() ◆ x_Connect() void CSysLog::x_Connect ( void  ) private ◆ x_CreateUID() void CDiagContext::x_CreateUID ( void  ) const private ◆ x_CreateUID_AsyncSafe() void CDiagContext::x_CreateUID_AsyncSafe ( void  ) const private ◆ x_DeserializeUrlEncoded() void CRequestContext_PassThrough::x_DeserializeUrlEncoded ( CTempString  data ) private ◆ x_DiagAtApplicationLevel() bool CDiagContext::x_DiagAtApplicationLevel ( void  ) const private ◆ x_EndMess() void CNcbiDiag::x_EndMess ( void  ) const private

Private replacement for Endm called from manipulators.

Unlike Endm, does not reset ErrCode if buffer is not set.

◆ x_FinalizeSetupDiag() void CDiagContext::x_FinalizeSetupDiag ( void  ) static ◆ x_GetDefaultHitID()

Definition at line 3099 of file ncbidiag.cpp.

References _ASSERT, CDiagContext::eHitID_Create, CDiagContext::m_DefaultHitId, CDiagContext::m_LoggedHitId, NPOS, s_HitId, s_HttpHitId, CRequestContext::SelectLastHitID(), string, CDiagContext::x_GetNextHitID(), and CDiagContext::x_LogHitID().

Referenced by CDiagContext::PrintStart(), and CRequestContext::x_GetHitID().

◆ x_GetDiagFileType()

Definition at line 7172 of file ncbidiag.cpp.

References eDiag_Info, eDiag_Trace, eDiagFile_All, eDiagFile_Err, eDiagFile_Log, eDiagFile_Perf, eDiagFile_Trace, eDPF_AppLog, SDiagMessage::eEvent_PerfLog, IsSetDiagPostFlag(), and msg().

Referenced by CFileDiagHandler::AllowAsyncWrite(), CFileDiagHandler::ComposeMessage(), and CFileDiagHandler::Post().

◆ x_GetHandler()

Definition at line 7193 of file ncbidiag.cpp.

References eDiagFile_Err, eDiagFile_Log, eDiagFile_Perf, eDiagFile_Trace, file_type, CFileDiagHandler::m_Err, CFileDiagHandler::m_Log, CFileDiagHandler::m_Perf, and CFileDiagHandler::m_Trace.

Referenced by CFileDiagHandler::AllowAsyncWrite(), CFileDiagHandler::ComposeMessage(), CFileDiagHandler::Post(), and CFileDiagHandler::WriteMessage().

◆ x_GetHitID()

Definition at line 229 of file request_ctx.cpp.

References CDiagContext::eHitID_NoCreate, CSharedHitId::Empty(), CRequestContext::eProp_HitID, GetDiagContext(), CSharedHitId::GetHitId(), kEmptyStr, CRequestContext::m_HitID, CRequestContext::SetHitID(), CRequestContext::x_CanModify(), CDiagContext::x_GetDefaultHitID(), CRequestContext::x_IsSetProp(), CRequestContext::x_LogHitID(), and CRequestContext::x_SetHitID().

Referenced by CRequestContext::GetHitID(), and CRequestContext::StopRequest().

◆ x_GetModule() string SDiagMessage::x_GetModule ( void  ) const ◆ x_GetNextHitID() string CDiagContext::x_GetNextHitID ( bool  is_default ) const private ◆ x_GetPassThroughProp() ◆ x_Init() [1/2]

Definition at line 575 of file ncbidiag.cpp.

References CDiagContextThreadData::AddCollectGuard(), CompareDiagPostLevel(), ePostNumber_NoIncrement, CDiagContextThreadData::GetCollectGuard(), CDiagCollectGuard::GetCollectSeverity(), CDiagCollectGuard::GetPrintSeverity(), CDiagContextThreadData::GetThreadData(), CDiagContext::GetThreadPostNumber(), CDiagCollectGuard::m_Action, CDiagCollectGuard::m_CollectSev, CDiagCollectGuard::m_PrintSev, CDiagCollectGuard::m_SeverityCap, and CDiagCollectGuard::m_StartingPoint.

Referenced by CDiagCollectGuard::CDiagCollectGuard().

◆ x_Init() [2/2] void COpentelemetryTracer::x_Init ( void  ) private ◆ x_InitData() void SDiagMessage::x_InitData ( void  ) const private

Definition at line 6020 of file ncbidiag.cpp.

References GetDiagContext(), CDiagContext::GetUID(), CTime::IsEmpty(), SDiagMessage::m_Buffer, SDiagMessage::m_BufferLen, SDiagMessage::m_Class, SDiagMessageData::m_Class, SDiagMessage::m_Data, SDiagMessage::m_ErrText, SDiagMessageData::m_ErrText, SDiagMessage::m_File, SDiagMessageData::m_File, SDiagMessage::m_Function, SDiagMessageData::m_Function, SDiagMessageData::m_Message, SDiagMessage::m_Module, SDiagMessageData::m_Module, SDiagMessage::m_Prefix, SDiagMessageData::m_Prefix, SDiagMessageData::m_Time, SDiagMessageData::m_UID, s_GetFastTime(), and string.

Referenced by SDiagMessage::x_SaveContextData().

◆ x_InitOtlp() void COpentelemetryTracer::x_InitOtlp ( const stringendpoint ) private ◆ x_InitStream() void COpentelemetryTracer::x_InitStream ( ostream &  ostr ) private ◆ x_IsSetDefaultHitID() bool CDiagContext::x_IsSetDefaultHitID ( void  ) const private ◆ x_IsSetOldFormat() bool SDiagMessage::x_IsSetOldFormat ( void  ) const inlineprivate ◆ x_IsSetPassThroughProp() ◆ x_IsSetProp()

Definition at line 1011 of file request_ctx.hpp.

References CRequestContext::m_PropSet, and true.

Referenced by CRequestContext::GetBytesRd(), CRequestContext::GetBytesWr(), CRequestContext::GetClientIP(), CRequestContext::GetDtab(), CRequestContext::GetEncodedSessionID(), CRequestContext::GetRequestID(), CRequestContext::GetRequestStatus(), CRequestContext::GetSessionID(), CRequestContext::IsSetBytesRd(), CRequestContext::IsSetBytesWr(), CRequestContext::IsSetDtab(), CRequestContext::IsSetExplicitClientIP(), CRequestContext::IsSetExplicitSessionID(), CRequestContext::IsSetHitID(), CRequestContext::IsSetRequestID(), CRequestContext::IsSetRequestStatus(), and CRequestContext::x_GetHitID().

◆ x_LoadEnvContextProperties() void CRequestContext::x_LoadEnvContextProperties ( void  ) private

Definition at line 840 of file request_ctx.cpp.

References NStr::eNocase, env, CNcbiApplicationAPI::GetEnvironment(), map_checker< Container >::insert(), CNcbiApplicationAPI::InstanceGuard(), ITERATE, CRequestContext::m_PassThroughProperties, mask, names, CRequestContext::sm_EnvContextProperties, CRequestContext::sx_GetContextFieldsMask(), CRequestContext::sx_NormalizeContextPropertyName(), and CRequestContext::x_CanModify().

Referenced by CRequestContext::CRequestContext(), CRequestContext::Reset(), and CRequestContext::StartRequest().

◆ x_LogEnvironment() void CDiagContext::x_LogEnvironment ( void  ) staticprivate

Definition at line 3323 of file ncbidiag.cpp.

References env, CDiagContext::Extra(), CDiagContext_Extra::Flush(), NStr::fSplit_MergeDelimiters, NStr::fSplit_Truncate, IRegistry::Get(), CSafeStatic< T, Callbacks >::Get(), CNcbiApplicationAPI::GetConfig(), GetDiagContext(), CNcbiApplicationAPI::GetEnvironment(), CNcbiApplicationAPI::InstanceGuard(), ITERATE, NCBI_PARAM_TYPE(), CDiagContext_Extra::Print(), NStr::Split(), NStr::SplitInTwo(), and val.

Referenced by CDiagContext::PrintStart(), and CDiagContext::x_StartRequest().

◆ x_LogHitID() [1/2] void CRequestContext::x_LogHitID ( bool  ignore_app_state = false ) const private

Definition at line 200 of file request_ctx.cpp.

References eDiagAppState_Request, eDiagAppState_RequestBegin, eDiagAppState_RequestEnd, CSharedHitId::Empty(), eNcbiStrings_PHID, CDiagContext::Extra(), CRequestContext::fLoggedOnRequest, g_GetNcbiString(), GetDiagContext(), CSharedHitId::GetHitId(), CRequestContext::m_AppState, CRequestContext::m_HitID, CRequestContext::m_HitIDLoggedFlag, and CDiagContext_Extra::Print().

Referenced by CRequestContext::StartRequest(), CRequestContext::x_GetHitID(), and CRequestContext::x_SetHitID().

◆ x_LogHitID() [2/2] void CDiagContext::x_LogHitID ( void  ) const private ◆ x_LogHitID_WithLock() void CDiagContext::x_LogHitID_WithLock ( void  ) const private ◆ x_LogHitIDOnError() bool CRequestContext::x_LogHitIDOnError ( void  ) const inlineprivate ◆ x_Match() ◆ x_Modify() void CRequestContext::x_Modify ( void  ) inlineprivate

Definition at line 1053 of file request_ctx.hpp.

References CAtomicCounter::Add(), CRequestContext::m_Version, and CRequestContext::sm_VersionCounter.

Referenced by CRequestContext::SetClientIP(), CRequestContext::SetRequestID(), CRequestContext::SetSessionID(), CRequestContext::UnsetClientIP(), CRequestContext::UnsetHitID(), CRequestContext::UnsetRequestID(), CRequestContext::UnsetSessionID(), CRequestContext::x_SetHitID(), and CRequestContext::x_UpdateSubHitID().

◆ x_NeedModule() bool CDiagCompileInfo::x_NeedModule ( void  ) const private ◆ x_NewWrite()

Definition at line 5863 of file ncbidiag.cpp.

References buf, eDPF_AppLog, eDPF_ErrCodeExplanation, eDPF_ErrCodeMessage, eDPF_ErrCodeUseSeverity, eDPF_IsNote, eDPF_LongFilename, eDPF_OmitSeparator, eDPF_Prefix, flags, SDiagMessage::fNoEndl, SDiagMessage::fNoPrefix, SDiagMessage::FormatExtraMessage(), GetDiagContext(), GetDiagErrCodeInfo(), SDiagMessage::GetEventName(), info, IsSetDiagErrCodeInfo(), IsSetDiagPostFlag(), SDiagMessage::m_Buffer, SDiagMessage::m_BufferLen, SDiagMessage::m_Class, SDiagMessage::m_ErrCode, SDiagMessage::m_ErrSubCode, SDiagMessage::m_ErrText, SDiagMessage::m_Event, SDiagErrCodeDescription::m_Explanation, SDiagMessage::m_ExtraArgs, SDiagMessage::m_File, SDiagMessage::m_Flags, SDiagMessage::m_Function, SDiagMessage::m_Line, SDiagErrCodeDescription::m_Message, SDiagMessage::m_Module, SDiagMessage::m_Prefix, SDiagMessage::m_PrintStackTrace, SDiagMessage::m_Severity, SDiagErrCodeDescription::m_Severity, SDiagMessage::s_EscapeNewlines(), s_FormatStackTrace(), s_MaxLineLength, CNcbiDiag::SeverityName(), CDiagContext::WriteStdPrefix(), and SDiagMessage::x_GetModule().

◆ x_OldWrite()

Definition at line 5675 of file ncbidiag.cpp.

References CTime::AsString(), buf, eDiag_Info, eDiagMergeLines_Off, eDiagMergeLines_On, eDPF_DateTime, eDPF_ErrCodeExplanation, eDPF_ErrCodeMessage, eDPF_ErrCodeMsgInFront, eDPF_ErrCodeUseSeverity, eDPF_ErrorID, eDPF_File, eDPF_IsNote, eDPF_Line, eDPF_Location, eDPF_LongFilename, eDPF_MergeLines, eDPF_OmitInfoSev, eDPF_Prefix, eDPF_Severity, eDPF_TID, flags, SDiagMessage::fNoEndl, CSafeStatic< T, Callbacks >::Get(), GetDiagErrCodeInfo(), CFastLocalTime::GetLocalTime(), CThread::GetSelf(), if(), info, IsSetDiagErrCodeInfo(), IsSetDiagPostFlag(), SDiagMessage::m_Buffer, SDiagMessage::m_BufferLen, SDiagMessage::m_Class, SDiagMessage::m_ErrCode, SDiagMessage::m_ErrSubCode, SDiagMessage::m_ErrText, SDiagErrCodeDescription::m_Explanation, SDiagMessage::m_File, SDiagMessage::m_Flags, SDiagMessage::m_Function, SDiagMessage::m_Line, SDiagErrCodeDescription::m_Message, SDiagMessage::m_Module, SDiagMessage::m_Prefix, SDiagMessage::m_PrintStackTrace, SDiagMessage::m_Severity, SDiagErrCodeDescription::m_Severity, NCBI_PARAM_TYPE(), NcbiEndl, NStr::ReplaceInPlace(), s_FormatStackTrace(), CNcbiDiag::SeverityName(), and SDiagMessage::x_GetModule().

Referenced by CTeeDiagHandler::Post().

◆ x_ParseExtraArgs()

Definition at line 4948 of file ncbidiag.cpp.

References IStringDecoder::Decode(), IStringDecoder::eName, CStringPairs< TContainer >::GetDecoder(), CStringPairs< TContainer >::GetPairs(), ITERATE, kExtraTypeArgName, SDiagMessage::m_ExtraArgs, SDiagMessage::m_TypedExtra, n, NPOS, CStringPairs< TContainer >::Parse(), NStr::SplitInTwo(), and str().

Referenced by SDiagMessage::ParseMessage().

◆ x_PrintMessage()

Definition at line 3376 of file ncbidiag.cpp.

References ctx, eDiag_Info, SDiagMessage::eEvent_Extra, SDiagMessage::eEvent_RequestStart, SDiagMessage::eEvent_RequestStop, SDiagMessage::eEvent_Start, SDiagMessage::eEvent_Stop, ERR_POST, ERR_POST_ONCE, CNcbiDiag::ForceImportantFlags(), CDiagContext::GetExitCode(), CDiagContext::GetExitSignal(), CDiagContext::GetRequestContext(), CDiagContext::IsSetOldPostFormat(), kApplogDiagPostFlags, SDiagMessage::m_Event, CDiagContext::m_StopWatch, NULL, s_IsDisabledAppLogEvent(), str(), Warning(), and CDiagContext::x_StartRequest().

Referenced by CDiagContext::PrintExtra(), CDiagContext::PrintProperties(), CDiagContext::PrintRequestStart(), CDiagContext::PrintRequestStop(), CDiagContext::PrintStart(), CDiagContext::PrintStop(), and CDiagContext::SetProperty().

◆ x_Put()

Helper func for the exception-related Put()

See also
Put()

Definition at line 7924 of file ncbidiag.cpp.

References AdjustApplogPrintableSeverity(), CNcbiDiag::CheckFilters(), CompareDiagPostLevel(), eDPF_IsConsole, CException::fConsole, CException::GetClass(), CDiagContextThreadData::GetCollectGuard(), CDiagCollectGuard::GetCollectSeverity(), CException::GetErrCode(), CException::GetErrCodeString(), CException::GetFile(), CException::GetFunction(), CException::GetLine(), CException::GetModule(), CNcbiDiag::GetPostFlags(), CException::GetPredecessor(), CDiagCollectGuard::GetPrintSeverity(), CNcbiDiag::GetSeverity(), CException::GetSeverity(), CException::GetStackTrace(), CDiagContextThreadData::GetThreadData(), CException::GetType(), CException::HasMainText(), IsOssEmpty(), CException::IsSetFlag(), CNcbiDiag::m_Buffer, SDiagMessage::m_Flags, CNcbiDiag::m_OmitStackTrace, NULL, s_FormatStackTrace(), s_GetExceptionText(), and text().

Referenced by CNcbiDiag::Put().

◆ x_Release() void CDiagContext_Extra::x_Release ( void  ) private ◆ x_ResetHandler() ◆ x_ResetPassThroughProp() void CRequestContext::x_ResetPassThroughProp ( CTempString  name, bool  update  ) const private ◆ x_SaveContextData() void SDiagMessage::x_SaveContextData ( void  ) const private

Definition at line 6056 of file ncbidiag.cpp.

References CDiagContext::GetAppState(), CRequestContext::GetClientIP(), GetDiagContext(), CDiagContext::GetEncodedAppName(), CDiagContext::GetEncodedHost(), CDiagContext::GetEncodedSessionID(), CDiagContext::GetRequestContext(), SDiagMessageData::m_AppName, SDiagMessageData::m_AppState, SDiagMessageData::m_Client, SDiagMessage::m_Data, SDiagMessageData::m_Host, SDiagMessageData::m_Session, and SDiagMessage::x_InitData().

Referenced by SDiagMessage::operator=().

◆ x_SerializeUrlEncoded() string CRequestContext_PassThrough::x_SerializeUrlEncoded ( void  ) const private ◆ x_SetFormat() void SDiagMessage::x_SetFormat ( EFormatFlag  fmt ) const inlineprivate ◆ x_SetHandler() ◆ x_SetHitID()

Definition at line 413 of file request_ctx.cpp.

References CRequestContext::eProp_HitID, ERR_POST_X, CRequestContext::fLoggedOnRequest, CSharedHitId::GetHitId(), CRequestContext::m_HitID, CRequestContext::m_HitIDLoggedFlag, CRequestContext::m_SubHitIDCache, Warning(), CRequestContext::x_CanModify(), CRequestContext::x_LogHitID(), CRequestContext::x_Modify(), and CRequestContext::x_SetProp().

Referenced by CRequestContext::SetHitID(), and CRequestContext::x_GetHitID().

◆ x_SetHitId() void CSharedHitId::x_SetHitId ( const stringhit_id ) private

Set new hit id, checks its validity.

Definition at line 130 of file request_ctx.cpp.

References eOnBadPHID_Allow, eOnBadPHID_AllowAndReport, eOnBadPHID_Ignore, eOnBadPHID_IgnoreAndReport, eOnBadPHID_Throw, ERR_POST_X, NStr::fSS_alnum, NStr::fSS_NoMerge, CSafeStatic< T, Callbacks >::Get(), CSharedHitId::GetHitId(), IsValidHitID(), kAllowedIdMarkchars, CSharedHitId::m_HitId, NCBI_THROW, NStr::PrintableString(), NStr::Sanitize(), and Warning().

Referenced by CSharedHitId::CSharedHitId(), and CSharedHitId::SetHitId().

◆ x_SetPassThroughProp() ◆ x_SetProp() void CRequestContext::x_SetProp ( EProperty  prop ) inlineprivate ◆ x_StartRequest() void CDiagContext::x_StartRequest ( void  ) staticprivate ◆ x_TranslateFacility()

Definition at line 203 of file syslog.cpp.

References CSysLog::eAuth, CSysLog::eAuthPriv, CSysLog::eCron, CSysLog::eDaemon, CSysLog::eDefaultFacility, CSysLog::eFTP, CSysLog::eKernel, CSysLog::eLocal0, CSysLog::eLocal1, CSysLog::eLocal2, CSysLog::eLocal3, CSysLog::eLocal4, CSysLog::eLocal5, CSysLog::eLocal6, CSysLog::eLocal7, CSysLog::eLPR, CSysLog::eMail, CSysLog::eNews, CSysLog::eSysLog, CSysLog::eUser, CSysLog::eUUCP, and CSysLog::m_DefaultFacility.

Referenced by CSysLog::Post().

◆ x_TranslateFlags() int CSysLog::x_TranslateFlags ( TFlags  flags ) staticprivate

Definition at line 150 of file syslog.cpp.

References ERR_POST_X, CSysLog::fAllFlags, CSysLog::fConnectNow, CSysLog::fCopyToStderr, CSysLog::fFallBackToConsole, CSysLog::fIncludePID, flags, CSysLog::fNoChildWait, CSysLog::fNoOverride, result, and Warning().

Referenced by CSysLog::x_Connect().

◆ x_UnsetProp() void CRequestContext::x_UnsetProp ( EProperty  prop ) inlineprivate ◆ x_UpdateStdContextProp() void CRequestContext::x_UpdateStdContextProp ( CTempString  name ) const private

Definition at line 731 of file request_ctx.cpp.

References ctx, CTempString::empty(), NStr::EqualNocase(), kPassThrough_ClientIp, kPassThrough_Dtab, kPassThrough_Phid, kPassThrough_Sid, match(), CRequestContext::x_GetPassThroughProp(), and CRequestContext::x_IsSetPassThroughProp().

Referenced by CRequestContext_PassThrough::Deserialize(), CRequestContext::x_ResetPassThroughProp(), and CRequestContext::x_SetPassThroughProp().

◆ x_UpdateStdPassThroughProp() void CRequestContext::x_UpdateStdPassThroughProp ( CTempString  name ) const private

Definition at line 690 of file request_ctx.cpp.

References CTempString::empty(), NStr::EqualNocase(), CRequestContext::GetClientIP(), CRequestContext::GetCurrentSubHitID(), CRequestContext::GetDtab(), CRequestContext::GetNextSubHitID(), CRequestContext::GetSessionID(), CRequestContext::IsSetClientIP(), CRequestContext::IsSetDtab(), CRequestContext::IsSetHitID(), CRequestContext::IsSetSessionID(), kPassThrough_ClientIp, kPassThrough_Dtab, kPassThrough_Phid, kPassThrough_Sid, CRequestContext::x_ResetPassThroughProp(), and CRequestContext::x_SetPassThroughProp().

Referenced by CRequestContext_PassThrough::Enumerate(), CRequestContext_PassThrough::Serialize(), CRequestContext::x_GetPassThroughProp(), and CRequestContext::x_IsSetPassThroughProp().

◆ x_UpdateSubHitID() void CRequestContext::x_UpdateSubHitID ( bool  increment, CTempString  prefix  ) private

Definition at line 445 of file request_ctx.cpp.

References _ASSERT, CDiagContext::Extra(), CSharedHitId::GetCurrentSubHitId(), GetDiagContext(), CRequestContext::GetHitID(), CSharedHitId::GetNextSubHitId(), CRequestContext::IsSetHitID(), CRequestContext::m_HitID, CRequestContext::m_SubHitIDCache, NStr::NumericToString(), CDiagContext_Extra::Print(), and CRequestContext::x_Modify().

Referenced by CRequestContext::GetCurrentSubHitID(), and CRequestContext::GetNextSubHitID().

◆ ~CAsyncDiagHandler() CAsyncDiagHandler::~CAsyncDiagHandler ( void  ) virtual ◆ ~CDiagAutoPrefix() CDiagAutoPrefix::~CDiagAutoPrefix ( void  ) ◆ ~CDiagCollectGuard() CDiagCollectGuard::~CDiagCollectGuard ( void  )

Destroy the guard, return post level to the one set before the guard initialization.

Depending on the currently set action print or discard the messages. On ePrint all collected messages are printed (if there is no higher level guard) and removed from the collection. On eDiscard the messages are silently discarded (only when the last of several nested guards is destroyed).

Definition at line 606 of file ncbidiag.cpp.

References CDiagCollectGuard::Release().

◆ ~CDiagCompileInfo() CDiagCompileInfo::~CDiagCompileInfo ( void  ) ◆ ~CDiagContext() CDiagContext::~CDiagContext ( void  ) ◆ ~CDiagContext_Extra() CDiagContext_Extra::~CDiagContext_Extra ( void  ) ◆ ~CDiagErrCodeInfo() CDiagErrCodeInfo::~CDiagErrCodeInfo ( void  )

Destructor.

◆ ~CDiagFactory() virtual CDiagFactory::~CDiagFactory ( ) inlinevirtual

Definition at line 2939 of file ncbidiag.hpp.

◆ ~CDiagHandler() virtual CDiagHandler::~CDiagHandler ( void  ) inlinevirtual ◆ ~CDiagRestorer() CDiagRestorer::~CDiagRestorer ( void  )

Restores captured settings.

Definition at line 8111 of file ncbidiag.cpp.

References buf, CDiagLock::eWrite, GetDiagBuffer(), CDiagRestorer::m_ApplogSeverityLocked, CDiagRestorer::m_CanDeleteErrCodeInfo, CDiagRestorer::m_CanDeleteHandler, CDiagRestorer::m_DieSeverity, CDiagRestorer::m_ErrCodeInfo, CDiagRestorer::m_Handler, CDiagRestorer::m_IgnoreToDie, CDiagRestorer::m_PostFlags, CDiagRestorer::m_PostPrefix, CDiagRestorer::m_PostSeverity, CDiagRestorer::m_PostSeverityChange, CDiagRestorer::m_PrefixList, CDiagRestorer::m_TraceDefault, CDiagRestorer::m_TraceEnabled, CDiagContext::SetApplogSeverityLocked(), SetDiagErrCodeInfo(), and SetDiagHandler().

◆ ~CFileDiagHandler() CFileDiagHandler::~CFileDiagHandler ( void  ) ◆ ~CFileHandleDiagHandler() CFileHandleDiagHandler::~CFileHandleDiagHandler ( void  ) ◆ ~CJaegerTracer() ◆ ~CNcbiDiag() CNcbiDiag::~CNcbiDiag ( void  ) ◆ ~CNcbiLogFields() CNcbiLogFields::~CNcbiLogFields ( void  )

Definition at line 4018 of file ncbidiag.cpp.

◆ ~COpentelemetryTracer() ◆ ~COpentelemetryTracerSpan() ◆ ~CPerfLogger() CPerfLogger::~CPerfLogger ( ) inline ◆ ~CPerfLogGuard() CPerfLogGuard::~CPerfLogGuard ( ) inline ◆ ~CRequestContext() CRequestContext::~CRequestContext ( void  ) virtual

Definition at line 188 of file request_ctx.cpp.

◆ ~CRequestContextGuard_Base() CRequestContextGuard_Base::~CRequestContextGuard_Base ( void  )

Destroy guard.

If released do nothing. On exception set error status. Print request-stop. Restore previous context.

Definition at line 954 of file request_ctx.cpp.

References ctx, CRequestStatus::e200_Ok, GetDiagContext(), CRef< C, Locker >::GetNonNullPointer(), CRequestContext::IsSetRequestStatus(), CRequestContextGuard_Base::m_ErrorStatus, CRequestContextGuard_Base::m_OriginatesFromThrow, CRequestContextGuard_Base::m_RequestContext, CRequestContextGuard_Base::m_SavedContext, CRequestContext::SetRequestStatus(), and CRequestContextGuard_Base::SetStatus().

◆ ~CSharedHitId() CSharedHitId::~CSharedHitId ( void  ) inline

Definition at line 75 of file request_ctx.hpp.

◆ ~CSysLog() ◆ ~INextDiagMessage() virtual INextDiagMessage::~INextDiagMessage ( void  ) inlinevirtual

Definition at line 1578 of file ncbidiag.hpp.

◆ ~IRequestTracer() virtual IRequestTracer::~IRequestTracer ( void  ) inlinevirtual

Definition at line 144 of file request_ctx.hpp.

◆ ~ITracerSpan() virtual ITracerSpan::~ITracerSpan ( void  ) inlinevirtual

Definition at line 153 of file request_ctx.hpp.

◆ ~SDiagMessage() SDiagMessage::~SDiagMessage ( void  ) ◆ key const char* SNcbiLog_Param::key ◆ kLogName_Syslog const char * CSysLog::kLogName_Syslog = "SYSLOG" static ◆ kProperty_AppName const char * CDiagContext::kProperty_AppName = "app_name" static ◆ kProperty_AppState const char * CDiagContext::kProperty_AppState = "app_state" static ◆ kProperty_BytesRd const char * CDiagContext::kProperty_BytesRd = "bytes_rd" static ◆ kProperty_BytesWr const char * CDiagContext::kProperty_BytesWr = "bytes_wr" static ◆ kProperty_ClientIP const char * CDiagContext::kProperty_ClientIP = "client_ip" static ◆ kProperty_ExitCode const char * CDiagContext::kProperty_ExitCode = "exit_code" static ◆ kProperty_ExitSig const char * CDiagContext::kProperty_ExitSig = "exit_signal" static ◆ kProperty_HostIP const char * CDiagContext::kProperty_HostIP = "host_ip_addr" static ◆ kProperty_HostName const char * CDiagContext::kProperty_HostName = "host" static ◆ kProperty_ReqStatus const char * CDiagContext::kProperty_ReqStatus = "request_status" static ◆ kProperty_ReqTime const char * CDiagContext::kProperty_ReqTime = "request_time" static ◆ kProperty_SessionID const char * CDiagContext::kProperty_SessionID = "session_id" static ◆ kProperty_UserName const char * CDiagContext::kProperty_UserName = "user" static ◆ m_Action EAction CDiagCollectGuard::m_Action private ◆ m_Adjustment double CPerfLogger::m_Adjustment private ◆ m_AllowBadExtraNames bool SDiagMessage::m_AllowBadExtraNames private ◆ m_AllowBadNames bool CDiagContext_Extra::m_AllowBadNames private ◆ m_AppLogRC ◆ m_ApplogSeverityLocked bool CDiagRestorer::m_ApplogSeverityLocked private ◆ m_AppLogSuspended atomic<bool> CDiagContext::m_AppLogSuspended private ◆ m_AppName ◆ m_AppNameSet bool CDiagContext::m_AppNameSet mutableprivate ◆ m_AppState [1/3] ◆ m_AppState [2/3] ◆ m_AppState [3/3] ◆ m_Args ◆ m_AsyncThread ◆ m_AutoIncOnPost bool CRequestContext::m_AutoIncOnPost private ◆ m_Buffer [1/2] CDiagBuffer& CNcbiDiag::m_Buffer private ◆ m_Buffer [2/2] const char* SDiagMessage::m_Buffer ◆ m_BufferLen size_t SDiagMessage::m_BufferLen ◆ m_BytesRd Int8 CRequestContext::m_BytesRd private ◆ m_BytesWr Int8 CRequestContext::m_BytesWr private ◆ m_CanDeleteErrCodeInfo bool CDiagRestorer::m_CanDeleteErrCodeInfo private ◆ m_CanDeleteHandler bool CDiagRestorer::m_CanDeleteHandler private ◆ m_Class [1/2] ◆ m_Class [2/2] const char* SDiagMessage::m_Class ◆ m_ClassName string CDiagCompileInfo::m_ClassName mutableprivate ◆ m_ClassSet bool CDiagCompileInfo::m_ClassSet mutableprivate ◆ m_ClientIP string CRequestContext::m_ClientIP private ◆ m_Code ◆ m_CollectSev EDiagSev CDiagCollectGuard::m_CollectSev private ◆ m_CompileInfo ◆ m_Context ◆ m_Counter int* CDiagContext_Extra::m_Counter private ◆ m_CurrFunctName const char* CDiagCompileInfo::m_CurrFunctName private ◆ m_Data

Definition at line 1752 of file ncbidiag.hpp.

Referenced by SDiagMessage::GetAppName(), SDiagMessage::GetAppState(), SDiagMessage::GetClient(), SDiagMessage::GetHost(), SDiagMessage::GetSession(), SDiagMessage::GetTime(), SDiagMessage::GetUID(), SDiagMessage::operator=(), SDiagMessage::ParseMessage(), SDiagMessage::x_InitData(), SDiagMessage::x_SaveContextData(), and SDiagMessage::~SDiagMessage().

◆ m_DefaultFacility int CSysLog::m_DefaultFacility private ◆ m_DefaultHitId ◆ m_DefaultSessionId ◆ m_DieSeverity ◆ m_DisabledAppLog bool CRequestContext::m_DisabledAppLog private ◆ m_DisabledAppLogEvents ◆ m_Dtab string CRequestContext::m_Dtab private ◆ m_Elapsed double CPerfLogger::m_Elapsed private ◆ m_Err ◆ m_ErrCode [1/2] ◆ m_ErrCode [2/2] int SDiagMessage::m_ErrCode ◆ m_ErrCodeInfo ◆ m_ErrLogRC ◆ m_ErrLogSuspended atomic<bool> CDiagContext::m_ErrLogSuspended private ◆ m_ErrorStatus int CRequestContextGuard_Base::m_ErrorStatus = 500 private ◆ m_ErrSubCode [1/2] int CNcbiDiag::m_ErrSubCode mutableprivate ◆ m_ErrSubCode [2/2] int SDiagMessage::m_ErrSubCode ◆ m_ErrText const char* SDiagMessage::m_ErrText ◆ m_Event ◆ m_EventType ◆ m_ExitCode int CDiagContext::m_ExitCode private ◆ m_ExitCodeSet bool CDiagContext::m_ExitCodeSet private ◆ m_ExitSig int CDiagContext::m_ExitSig private ◆ m_Explanation string SDiagErrCodeDescription::m_Explanation ◆ m_ExtraArgs ◆ m_Fields ◆ m_File [1/2] const char* CDiagCompileInfo::m_File private ◆ m_File [2/2] const char* SDiagMessage::m_File ◆ m_FileType ◆ m_FirstStartTime CTime CPerfLogger::m_FirstStartTime private ◆ m_Flags [1/5] ◆ m_Flags [2/5] ◆ m_Flags [3/5] ◆ m_Flags [4/5] TFlags CRequestContextGuard_Base::m_Flags = 0 private ◆ m_Flags [5/5] ◆ m_Flushed bool CDiagContext_Extra::m_Flushed private ◆ m_Format ◆ m_Function [1/2] ◆ m_Function [2/2] const char* SDiagMessage::m_Function ◆ m_FunctName string CDiagCompileInfo::m_FunctName mutableprivate ◆ m_Handle ◆ m_HandleLock CSpinLock* CFileHandleDiagHandler::m_HandleLock private ◆ m_Handler ◆ m_HavePosts bool CFileHandleDiagHandler::m_HavePosts private ◆ m_HitId ◆ m_HitID ◆ m_HitIDLoggedFlag int CRequestContext::m_HitIDLoggedFlag mutableprivate ◆ m_Host ◆ m_HostIP ◆ m_Ident ◆ m_IgnoreToDie bool CDiagRestorer::m_IgnoreToDie private ◆ m_Info TInfo CDiagErrCodeInfo::m_Info private ◆ m_IsDiscarded bool CPerfLogger::m_IsDiscarded private ◆ m_IsReadOnly bool CRequestContext::m_IsReadOnly private ◆ m_IsRunning bool CRequestContext::m_IsRunning private ◆ m_LastStartTime CTime CPerfLogger::m_LastStartTime private ◆ m_Level ◆ m_Line [1/2] int CDiagCompileInfo::m_Line private ◆ m_Line [2/2] size_t SDiagMessage::m_Line ◆ m_Log ◆ m_LoggedHitId bool CDiagContext::m_LoggedHitId mutableprivate ◆ m_Logger ◆ m_LogName char CStreamDiagHandler_Base::m_LogName[2048] private ◆ m_LowDiskSpace bool CFileHandleDiagHandler::m_LowDiskSpace private ◆ m_MaxMessages size_t CDiagContext::m_MaxMessages private ◆ m_Message string SDiagErrCodeDescription::m_Message ◆ m_Messages [1/2] unique_ptr<TMessages> CDiagContext::m_Messages private ◆ m_Messages [2/2] unique_ptr<TMessages> CFileHandleDiagHandler::m_Messages private ◆ m_Module [1/3] const char* CDiagCompileInfo::m_Module private ◆ m_Module [2/3] ◆ m_Module [3/3] const char* SDiagMessage::m_Module ◆ m_NoTee bool SDiagMessage::m_NoTee ◆ m_OmitStackTrace bool CNcbiDiag::m_OmitStackTrace mutableprivate ◆ m_OriginatesFromThrow bool CRequestContextGuard_Base::m_OriginatesFromThrow = false private ◆ m_OwnErr bool CFileDiagHandler::m_OwnErr private ◆ m_OwnerTID Uint8 CRequestContext::m_OwnerTID private ◆ m_OwnLog bool CFileDiagHandler::m_OwnLog private ◆ m_OwnPerf bool CFileDiagHandler::m_OwnPerf private ◆ m_OwnTrace bool CFileDiagHandler::m_OwnTrace private ◆ m_Parameters ◆ m_Parsed bool CDiagCompileInfo::m_Parsed mutableprivate ◆ m_PassThroughProperties ◆ m_Perf ◆ m_PerfStatus int CDiagContext_Extra::m_PerfStatus private ◆ m_PerfTime double CDiagContext_Extra::m_PerfTime private ◆ m_PID ◆ m_PostFlags [1/2] ◆ m_PostFlags [2/2] ◆ m_PostPrefix string CDiagRestorer::m_PostPrefix private ◆ m_PostSeverity ◆ m_PostSeverityChange ◆ m_Prefix const char* SDiagMessage::m_Prefix ◆ m_PrefixList list<string> CDiagRestorer::m_PrefixList private ◆ m_PrintSev ◆ m_PrintStackTrace bool SDiagMessage::m_PrintStackTrace ◆ m_ProcPost TCount SDiagMessage::m_ProcPost ◆ m_Properties [1/2] ◆ m_Properties [2/2] ◆ m_PropSet ◆ m_QuickFlush bool CStreamDiagHandler::m_QuickFlush private ◆ m_ReopenTimer [1/2] ◆ m_ReopenTimer [2/2] ◆ m_ReqStatus int CRequestContext::m_ReqStatus private ◆ m_ReqTimer ◆ m_RequestContext ◆ m_RequestId TCount SDiagMessage::m_RequestId ◆ m_RequestID TCount CRequestContext::m_RequestID private ◆ m_Resource string CPerfLogGuard::m_Resource private ◆ m_SavedContext ◆ m_SessionID ◆ m_Severity [1/3] ◆ m_Severity [2/3]

Severity level.

Definition at line 1651 of file ncbidiag.hpp.

Referenced by DisplayDiagnostic(), SDiagMessage::operator=(), SDiagMessage::ParseMessage(), CBlastAppDiagHandler::Post(), CAsyncDiagHandler::Post(), CSysLog::Post(), CTeeDiagHandler::Post(), CTable2AsnLogger::Post(), CPythonDiagHandler::Post(), COpentelemetryTracerSpan::PostEvent(), CDiagHandler::PostToConsole(), SDiagMessage::SDiagMessage(), ncbi::CNcbiToolkit_LogMessage::Severity(), SDiagMessage::x_NewWrite(), and SDiagMessage::x_OldWrite().

◆ m_Severity [3/3] int SDiagErrCodeDescription::m_Severity ◆ m_SeverityCap EDiagSev CDiagCollectGuard::m_SeverityCap private ◆ m_SharedSubHitId ◆ m_Source string CNcbiLogFields::m_Source private ◆ m_Span [1/2] shared_ptr<jaegertracing::Span> CJaegerTracerSpan::m_Span private ◆ m_Span [2/2] TSpan COpentelemetryTracerSpan::m_Span private ◆ m_SpanKind [1/2] opentelemetry::trace::SpanKind COpentelemetryTracer::m_SpanKind = opentelemetry::trace::SpanKind::kInternal private ◆ m_SpanKind [2/2] ◆ m_StartingPoint Uint8 CDiagCollectGuard::m_StartingPoint private ◆ m_StopWatch [1/2] ◆ m_StopWatch [2/2] ◆ m_StrCurrFunctName string CDiagCompileInfo::m_StrCurrFunctName private ◆ m_Stream ◆ m_StrFile string CDiagCompileInfo::m_StrFile private ◆ m_StrModule string CDiagCompileInfo::m_StrModule private ◆ m_SubCode ◆ m_SubHitId ◆ m_SubHitIDCache string CRequestContext::m_SubHitIDCache private ◆ m_ThreadSuffix string CAsyncDiagHandler::m_ThreadSuffix private ◆ m_ThrPost TCount SDiagMessage::m_ThrPost ◆ m_TID ◆ m_TimerState ◆ m_Trace ◆ m_TraceDefault ◆ m_TraceEnabled bool CDiagRestorer::m_TraceEnabled private ◆ m_TraceLogRC ◆ m_TraceLogSuspended atomic<bool> CDiagContext::m_TraceLogSuspended private ◆ m_TraceParent [1/2] ◆ m_TraceParent [2/2] string CRequestContext::m_TraceParent private ◆ m_Tracer [1/2] ◆ m_Tracer [2/2] ◆ m_TracerSpan ◆ m_TraceState [1/2] ◆ m_TraceState [2/2] string CRequestContext::m_TraceState private ◆ m_Typed bool CDiagContext_Extra::m_Typed private ◆ m_TypedExtra bool SDiagMessage::m_TypedExtra ◆ m_UID ◆ m_Username ◆ m_Version ◆ sm_ApplogSeverityLocked bool CDiagContext::sm_ApplogSeverityLocked = false staticprivate ◆ sm_ContextFields ◆ sm_Current ◆ sm_EnvContextProperties ◆ sm_Instance ◆ sm_PID ◆ sm_Tracer ◆ sm_VersionCounter ◆ value const char* SNcbiLog_Param::value ◆ CDiagBuffer [1/2] ◆ CDiagBuffer [2/2] ◆ CDiagContext [1/3] ◆ CDiagContext [2/3] ◆ CDiagContext [3/3] ◆ CDiagContext_Extra [1/2] ◆ CDiagContext_Extra [2/2] ◆ CDiagContextThreadData [1/2] ◆ CDiagContextThreadData [2/2] ◆ CNcbiDiag ◆ Console

Set IsConsole flag to indicate that the current post should go to console regardless of its severity (in addition to the default output – file etc.).

Do not flush current post or change the severity. The flag is reset by the next Flush().

◆ COpentelemetryTracer ◆ CPerfLogGuard ◆ CRequestContext ◆ CRequestContext_PassThrough ◆ Critical

Flush current message, then set a severity for the next diagnostic message to CRITICAL ERROR.

◆ Endm ◆ Error

Flush current message, then set a severity for the next diagnostic message to ERROR.

◆ Fatal

Flush current message, then set a severity for the next diagnostic message to FATAL.

◆ g_PostPerf ◆ Info

Flush current message, then set a severity for the next diagnostic message to INFO.

◆ Message

Set IsMessage flag to indicate that the current post is a message.

Do not flush current post or change the severity. The flag is reset by the next Flush().

Deprecated:
Use Note manipulator.
◆ Note

Set IsNote flag to indicate that the current post is a note.

Do not flush current post or change the severity. The flag is reset by the next Flush().

◆ operator<< [1/3] ◆ operator<< [2/3] ◆ operator<< [3/3] ◆ Reset

Reset the content of current message.

◆ StackTrace ◆ Trace

Flush current message, then set a severity for the next diagnostic message to TRACE.

◆ Warning

Flush current message, then set a severity for the next diagnostic message to WARNING.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4