Classes | Defines | Enumerations | Enumerator | Functions | Variables

Error logging
[Common modules]

Collaboration diagram for Error logging:

Classes

class  log_ErrorStream
 Stream to log errors. More...

Defines

#define log_OUTPUT_m(_stream, _lev, _flags, _text)
 This is the basic macro, used for error logging.
#define log_MSG_m(_level, _flags, _message)
 This is a specialised log_OUTPUT_m that uses IVD standard error stream as outut stream.
#define log_ERR_m(_error)   log_MSG_m(log_ERROR, log_DUMP_STACK, _error)
 This is a specialised log_MSG_m that marks log_ERROR message and dumps stack.
#define log_WRN_m(_warning)   log_MSG_m(log_WARNING, log_DUMP_STACK, _warning)
#define log_NOTE_m(_note)   log_MSG_m(log_NOTE, 0, _note)
#define log_TRACE_m(_trcStream, _lev, _flags, _text)   log_OUTPUT_m(_trcStream, _lev, _flags, _text)
 Beside general error log file, various IVD components can have their own trace/log files for their purposes.

Enumerations

enum  log_Level_t {
  log_NOTE = 1, log_WARNING = 2,
  log_ERROR = 3
}
 

Importance of the logged message.

More...
enum  log_Flags_e { log_DUMP_STACK = 1 }
 

Bit flags for error logging.

More...

Functions

virtual log_ErrorStream::~log_ErrorStream ()
int log_ErrorStream::SetNewPath (void)
bool log_ErrorStream::IsBroken () const
string log_ErrorStream::GetHeader () const
void IVD_CMN_DECL_d log_Output (log_File &a_os, log_Level_t a_level, int a_flags, const string &a_msg, log_FunctionTracer &a_fcnTrc, long a_line)
 Helper function to prepare output of a log message.

Variables

static bool log_ErrorStream::m_created = false
 Flag to guarantee singleton.
bool log_ErrorStream::m_broken

Detailed Description

See also:
File, class and function identification
Debugging
ivdcmn

Define Documentation

#define log_ERR_m (   _error  )     log_MSG_m(log_ERROR, log_DUMP_STACK, _error)

This is a specialised log_MSG_m that marks log_ERROR message and dumps stack.

Example:

log_ERR_m(
    "File " << m_fileName << " can't be accessed." << endl <<
    "Error code: " << errCode;
);

Definition at line 185 of file errorlog.h.

Referenced by i_Job_i::ActivateBea(), PreMountsMgr::Add(), i_ResourceManager_i::AddDrive(), i_ManagementInterface_i::AddDrive(), i_ManagementInterface_i::AddLibrary(), hsm_HL7CacheFile::AddMessageToCache(), fio_uvListMgr::AddVectorToBuff(), rm_Queue::Allocate(), rm_Queue::AllocateAdmin(), rm_Queue::AllocateMaint(), rm_Queue::AllocateMig(), rm_Queue::AllocateRec(), rm_Queue::AllocateRecovery(), rm_Queue::AllocateReorg(), bea_DupWriteThread::AppendVolume(), ChangePriviliges(), ChangeSinglePrivilege(), rm_Operator::CheckForAnyResourceForMig(), bea_FRIThread::CheckFRI(), pm_JobMgr::CheckFSCvsIVDFS(), i_MediumDupl_i::CheckTargetMedium(), df_Filter::CheckUnhandledFiles(), i_AdminJob_i::CheckVolumesForFriMicJob(), i_EfficientRecallJob_i::CleanUp(), fio_Transaction::CleanUp(), i_AdminJob_i::CloseVolume(), cmn_UTF8Converter::cmn_UTF8Converter(), i_ThreadJob_i::CompleteJob(), i_ReorgJob_i::CompleteJob(), i_RedundantCopyJob_i::CompleteJob(), i_RecallJob_i::CompleteJob(), i_MigrationJob_i::CompleteJob(), i_MaintFriJob_i::CompleteJob(), i_EfficientRecallJob_i::CompleteJob(), i_HSM_i::CompleteMigration(), i_FSC_i::CompleteMigration(), pm_JobMgr::CreateCheckFSCvsMediaJob(), pm_JobMgr::CreateCheckFSCvsMediumJob(), pm_JobMgr::CreateCopyContentsJob(), pm_JobMgr::CreateDelExpiredFilesJob(), pm_JobMgr::CreateEfficientRecallJobs(), pm_JobMgr::CreateFSCRecoveryJob(), pm_JobMgr::CreateIVDFSRecoveryJob(), pm_JobMgr::CreateMigrationJob(), pm_JobMgr::CreateRecallJob(), pm_JobMgr::CreateReorgScanJob(), i_AdminJob_i::DetectVolumeHeader(), rm_DiskBufAllocator::DetectVolumes(), i_AdminJob_i::DoInitialize(), i_HSM_i::DoMigrationJob(), i_HSM_i::EfficientRecall(), la_SCSILibrary::EjectMedium(), hsm_FileHeader::EventOffline(), i_ResourceManager_i::ExecStartLA(), i_VvCopyJob_i::Execute(), i_RecallJob_i::Execute(), i_MigrationJob_i::Execute(), i_MediumDupl_i::Execute(), i_MaintFriJob_i::Execute(), i_FSCCheckJob_i::Execute(), i_BackupJob_i::Execute(), i_AdminJob_i::Execute(), fio_RelFile::fio_RelFile(), i_HSM_i::ForceRelease(), i_AdminJob_i::Format(), ivd_BaseException::FormatText(), rm_Operator::GetBestCopy(), cdb_Write::GetBufferSize(), cdb_Read::GetBufferSize(), cdb_ModeSelect::GetBufferSize(), mif_CfgRep::GetCfg(), fsc_DataL::GetCopiesPos(), hsm_FHmigc::GetFileIDs(), df_BlockManager::GetFree(), rm_Operator::GetHost(), i_BackupJob_i::GetNewResources(), df_BlockScanner::GetNextRecord(), ivd_FS_Event::GetRootDir(), cmn_File::GetStreamHeader(), cmn_SysInfo::GetSystemData(), hsm_HL7CacheFile::hsm_HL7CacheFile(), i_BackEndAgent_i::i_BackEndAgent_i(), i_LibraryAgentManual_i::i_LibraryAgentManual_i(), i_LibraryAgentSCSI_i::i_LibraryAgentSCSI_i(), i_ManagementInterface_i::i_ManagementInterface_i(), i_PartitionManager_i::i_PartitionManager_i(), i_ReorgJob_i::i_ReorgJob_i(), i_ResourceManager_i::i_ResourceManager_i(), ipc_Corba::Init(), i_AdminJob_i::Initialize(), i_AdminJob_i::InitializeSingleVolume(), i_ReorgJob_i::InitializeVolumes(), scsi_IO::InqSerialNumber(), JobListMgr< T1 >::Insert(), i_FSC_i::InsertSplitFromFRIBlock(), rm_Operator::InventoryUpdate(), ipc_ORBLogCallback(), IsFileOffline(), i_ManagementInterface_i::JobInfo(), i_ManagementInterface_i::ListJob(), i_ManagementInterface_i::ListJobs(), i_Job_i::LoadUnload(), main(), i_RecallJob_i::MediumOperationComplete(), i_MigrationJob_i::MediumOperationComplete(), i_MediumDupl_i::MediumOperationComplete(), i_EfficientRecallJob_i::MediumOperationComplete(), rm_Operator::MediumUnLoaded(), df_FRI::MediumVolumeStart(), hsm_JobListMgr::MigrateFailedJob(), i_ReorgJob_i::MigrateFiles(), i_RedundantCopyJob_i::MigrateFiles(), la_SCSILibrary::Open(), cmn_File::OpenF(), i_AdminJob_i::OperateLA(), i_PartitionManager_i::ParseConfig(), i_ResourceManager_i::ParsePMConfig(), ParseTapeMedium(), i_EfficientRecallJob_i::PrepareRecallListSeq(), i_RecallJob_i::PrepareResource(), i_EfficientRecallJob_i::PrepareResource(), i_BackupJob_i::PrepareResource(), i_RecallJob_i::Process(), i_MediumDupl_i::Process(), i_MaintFriJob_i::Process(), i_EfficientRecallJob_i::Process(), i_RecoveryJob_i::ProcessFRI(), i_MediumCheckJob_i::ProcessFRI(), df_Filter::ProcRecBSEnd(), df_SplitInfoUnpacker::ProcRecRawData(), bea_Volume::Read(), cmn_SysInfo::Read_IP_FQDN(), fio_RelFile::ReadListOfUnusedVector(), hsm_HL7CacheFile::ReadNextFile(), i_RedundantCopyJob_i::ReadSourceData(), i_ReorgJob_i::ReadSourceVolume(), fio_Transaction::ReadUVListFromJour(), hsm_FileHeader::Recalled(), i_RecallJob_i::RecallRetry(), i_LibraryAgentManual_i::Reconfigure(), i_AdminJob_i::RecreateFRIandMIC(), i_Job_i::ReleaseDiskBuffer(), i_Job_i::ReleaseResource(), rm_Operator::ReleaseResources(), i_RecallJob_i::ReleaseResources(), i_MaintFriJob_i::ReleaseResources(), i_EfficientRecallJob_i::ReleaseResources(), fio_RelFileTrans::ReleaseVectorIdx(), mif_CfgRep::RemoveCfg(), i_ManagementInterface_i::RemoveDrive(), job_Manager::RemoveFromList(), i_ManagementInterface_i::RemoveLibrary(), i_ManagementInterface_i::RemoveMedium(), i_ManagementInterface_i::RemovePartition(), i_ReorgJob_i::ReorgStatusCleanup(), ivd_FS_Event::ReplySyncEvent(), ReportStatusToSCM(), ipc_Corba::Resolve(), ipc_Corba::ResolveTargetPM(), rm_DBThread::Resume(), rm_DiskBuffer::rm_DiskBuffer(), rm_QueueExecutor::Run(), job_Executor::Run(), ivd_FileSystemAPI::Run(), FSEvMgrThrd::Run(), pm_AssignResThread::Run(), fs_api::Run(), blk_NetWriter::Run(), blk_BufferWriter::Run(), bea_RecallThread::Run(), bea_MigrationThread::Run(), RunOmniNames(), hsm_HL7MessageProxy::RunUndetached(), rm_Medium::SelectByStatus(), rm_Operator::SelectDriveForMig(), mif_PartMgr::SendClientFSIDs(), FSEvMgrThrd::SendReply(), i_FsEvMgr_i::SendReply(), hsm_FHmigc::SendToPM(), ServiceInstall(), ServiceLoop(), ServiceMain(), ServiceRemove(), fio_RelFile::SetFirstNewIDX(), i_ManagementInterface_i::SetJobPriority(), i_ResourceManager_i::StartAllLA(), i_AdminJob_i::StartBEA(), rm_ColMediaVol::StartSelectAll(), rm_MinorCol::StartSelectAll(), rm_MajorCol::StartSelectAll(), rm_Partition::StartSelectAll(), rm_MediumVol::StartSelectAll(), rm_Medium::StartSelectAll(), rm_Slot::StartSelectAll(), rm_MediaPool::StartSelectAll(), rm_DiskSubsys::StartSelectAll(), rm_DriveHost::StartSelectAll(), rm_Drive::StartSelectAll(), rm_Library::StartSelectAll(), la_SCSILibrary::Status(), i_ResourceManager_i::StopAllLA(), df_RecReader::Unpack(), i_HSM_i::UnPackFile(), i_ManagementInterface_i::UpdateDrive(), mif_CfgRep::Upload(), i_Job_i::WaitBea(), while(), log_EventLogger::Write(), bea_MigrationThread::WriteBlock(), fio_RelFile::WriteHeader(), fio_RelFile::WriteListOfUnusedVector(), blk_DiskFRIWriter::~blk_DiskFRIWriter(), blk_StdIOReader::~blk_StdIOReader(), blk_StdIOWriter::~blk_StdIOWriter(), cmn_DirLst::~cmn_DirLst(), i_MaintFriJob_i::~i_MaintFriJob_i(), i_RedundantCopyJob_i::~i_RedundantCopyJob_i(), i_ReorgJob_i::~i_ReorgJob_i(), ipc_Corba::~ipc_Corba(), and job_Executor::~job_Executor().

#define log_MSG_m (   _level,
  _flags,
  _message 
)
Value:
if (!g_cmn.err.IsBroken()) { \
        log_OUTPUT_m(g_cmn.err, _level, _flags, _message) \
    }

This is a specialised log_OUTPUT_m that uses IVD standard error stream as outut stream.

This is the basic macro for general error logging. This macro (or one of specialised ones, such as log_ERR_m, log_WRN_m, log_NOTE_m) is used in the source code to log critical, unexpected situations to a predefined log file. Please keep in mind that this macro is not a facility for program execution tracing or similar but a helper for IVD support to pin down problem locations.

Functions that want to perform error logging, must have defined log_FUNC_m.

Example:

log_MSG_m(log_NOTE, log_DUMP_STACK,
    "File " << m_fileName << " can't be accessed." << endl <<
    "Error code: " << errCode;
);

TIP: If a performance critical function must log an error, then the following trick can be used:

void cmn_Critical::VeryCritical(string a_name) {
    // Do something important
    if (error) {
        // Function logging constants are instantiated only
        // if an error occurs.
        log_FUNC_A_m(VeryCritical, "string " << a_name);

        log_MSG_m(log_NOTE, log_DUMP_STACK,
            "File " << m_fileName << " can't be accessed." << endl <<
            "Error code: " << errCode;
        );
    }
}
See also:
log_OUTPUT_m

Definition at line 169 of file errorlog.h.

Referenced by fsc_VolumeCheck::Check(), fsc_CopyMgr::GetCopiesPos(), and fsc_nsDirEntryMgr::RemoveEntry().

#define log_NOTE_m (   _note  )     log_MSG_m(log_NOTE, 0, _note)
#define log_OUTPUT_m (   _stream,
  _lev,
  _flags,
  _text 
)
Value:
{ \
        ostringstream sStr; \
        sStr << _text; \
        log_Output(_stream, _lev, _flags, sStr.str(), this_fcnTracer, __LINE__); \
    }

This is the basic macro, used for error logging.

Please do not use this macro directly in your source code.

Macro prints whole message to a string stream first and then it is dumped to the specified _stream. Logging of messages is unmaskable and can't be turned off.

Parameters:
_stream any stx_Stream or its child class
_lev level of importance of printed _text (one of log_Level_e)
_flags additional flags that control the output (one of log_Flags_e)
_text text to be printed out
See also:
log_MSG_m
log_ERR_m
log_WRN_m
log_NOTE_m
log_TRACE_m

Definition at line 92 of file errorlog.h.

#define log_TRACE_m (   _trcStream,
  _lev,
  _flags,
  _text 
)    log_OUTPUT_m(_trcStream, _lev, _flags, _text)

Beside general error log file, various IVD components can have their own trace/log files for their purposes.

Usage of the macro is similar to log_MSG_m, except that caller must provide its own output stream as the first parameter. Output stream must be (or derived from) stx_Stream.

Example:

stx_Stream rmLogFile("rm.log");
log_TRACE_m(rmLogFile, log_NOTE, log_DUMP_STACK,
    "Corruption of table " << m_tableName << " detected and fixed." << endl
);
See also:
log_OUTPUT_m

Definition at line 218 of file errorlog.h.

#define log_WRN_m (   _warning  )     log_MSG_m(log_WARNING, log_DUMP_STACK, _warning)
See also:
log_MSG_m
log_ERR_m

Definition at line 192 of file errorlog.h.

Referenced by i_Job_i::AbortJob(), hsm_ActiveFH::ActiveToList(), bea_FRIThread::bea_FRIThread(), df_FRI::BlockWritten(), bea_FRIThread::CheckFRI(), scsi_IO::CheckStatusAndSense(), stx_CacheVec::CleanUpAndNotify(), df_Filter::CloseCopiedSplit(), cmn_UTF8Converter::ConvertFromUTF8(), cfg_RMDrive::ConvertGroup(), cfg_PMCfg::ConvertGroup(), cfg_DriveVendor::ConvertGroup(), cmn_UTF8Converter::ConvertToUTF8(), hsm_IVDFSRecoverer::CreateFile(), bea_FRI::CreateFRI(), hsm_IVDFSRecoverer::CreateParentDir(), data_ElementStatus::data_ElementStatus(), i_AdminJob_i::DeleteMedVolFromRMDB(), rm_DiskBufAllocator::DetectVolumes(), i_ManagementInterface_i::DisableDebug(), i_HSM_i::EfficientRecall(), la_SCSILibrary::EjectMedium(), i_ManagementInterface_i::EnableDebug(), fs_api::EventMove(), bea_DiskVolume::ExtendToFullBlock(), i_PartitionManager_i::FillClientCfg(), fs_api::FindAndPrepareFH(), fio_JourHandle::FindNextTransHdr(), df_Writer::FlushBlock(), df_FRI::FlushCurrentSplit(), fsc_MedVolReader::fsc_MedVolReader(), i_FSC_i::GetCopiesPos(), fs_api::GetDirFH(), GetFSType(), i_PartitionManager_i::GetHSM(), df_Unpacker::GetNextBlock(), cmn_SysInfo::GetSystemData(), fio_TransLstMgr::GetTransObj(), df_FRIDistiller::HandleDFError(), hsm_CheckFile2hsmdbRec(), i_BackupJob_i::i_BackupJob_i(), bea_MediumMemory::IncLoadCount(), fsc_DataCollectorStorage::InitBuffer(), i_AdminJob_i::Initialize(), scsi_IO::InqSerialNumber(), fsc_GenerationMgr::Insert(), fsc_nsElement::InsertSplit(), bea_MediumMemory::IsValid(), df_Packer::MakeSpaceForData(), rm_Operator::MediumUnLoaded(), df_FRI::MediumVolumeEnd(), mif_ResolveHostToFQDN(), i_HSM_i::MigrateByAPI(), bea_FRI::MoveFromWorkToFRI(), bea_Volume::MustDumpFRI(), i_HSM_i::PackFile(), i_PartitionManager_i::ParseConfig(), data_ElementStatus::ParseElemStatus(), fsc_CollectorRedunCopy::PostCopiesProc(), dbo_InitAllResource::Process(), i_MediumDupl_i::Process(), bea_FRIThread::ProcessFromDataVol(), df_FRIDistiller::ProcRecBSEnd(), df_Filter::ProcRecBSEnd(), df_FRIDistiller::ProcRecBSStart(), hsm_Recall::ProcRecEmbData(), hsm_IVDFSRecoverer::ProcRecFileEnd(), hsm_IVDFSRecoverer::ProcRecFileHdr(), hsm_Recall::ProcRecRawData(), hsm_FileHeader::QueueHL7Message(), bea_MicMemory::Read(), cmn_SysInfo::Read_IP_FQDN(), i_LibraryAgentSCSI_i::ReadDriveInfo(), i_LibraryAgentManual_i::ReadDriveInfo(), bea_DiskVolume::ReadEstimSizes(), bea_FRI::ReadFRIStart(), bea_DiskVolume::ReadRaw(), fio_Transaction::ReadTransactionFromLog(), fio_uvListMgr::ReadUV(), bea_Volume::ReadVolInfoFromHeader(), i_HSM_i::Recall(), hsm_FileHeader::Recalled(), hsm_Recall::RecallOfFileCanceled(), i_RecallJob_i::RecallRetry(), i_LibraryAgentSCSI_i::Reconfigure(), cfg_DriveSettings::Refresh(), bea_MediumMemory::Refresh(), i_PartitionManager_i::RegisterHSM(), df_BlockReader::ReleaseAndGetNextBlock(), i_Job_i::ReleaseDiskBuffer(), i_ResourceManager_i::ReleaseResource(), i_ManagementInterface_i::RemoveMedium(), i_ManagementInterface_i::RemovePartition(), mif_CfgRep::ReplaceDate(), bea_FRI::SaveFRIOnError(), rm_Operator::SelectDriveForMig(), rm_Operator::SelectMediumForMig(), data_Mode::SetAITMode(), bea_Medium::SetBarcode(), bea_Volume::SetDeclaredSize(), SetFSType(), data_Mode::SetPartitions(), i_ResourceManager_i::SetRMPartStatus(), scsi_IO::SkipAttAndDeferred(), i_Component_i::StartDebug(), i_Component_i::StopDebug(), bea_MediumMemory::UpdateAccess(), bea_MediumMemory::UpdateAppend(), i_BackEndAgent_i::UpdateMediumIDs(), bea_MediumMemory::UpdateOverwrite(), i_BackEndAgent_i::UpdateVolumeUsed(), df_BlockManager::WaitReadersToComplete(), scsi_IO::WaitToBecomeReady(), df_BlockManager::WaitWriterToComplete(), log_EventLogger::Write(), blk_DiskFRIWriter::Write(), blk_DiskBufferWriter::Write(), cmn_File::WriteF(), bea_DiskVolume::WriteRaw(), df_Packer::WriteRecBSEnd(), df_Packer::WriteRecCmn(), i_Job_i::~i_Job_i(), i_UploadAgent_i::~i_UploadAgent_i(), and scsi_LnxSG::~scsi_LnxSG().


Enumeration Type Documentation

Bit flags for error logging.

See also:
log_MSG_m
log_TRACE_m
Enumerator:
log_DUMP_STACK 

Dump stack when logging message.

Definition at line 122 of file errorlog.h.

                 {
    log_DUMP_STACK  = 1
};

Importance of the logged message.

See also:
log_MSG_m
log_TRACE_m
Enumerator:
log_NOTE 

Low importance of log message.

log_WARNING 

Warning log message.

Somethning unexpected has happened but the system managed to correct the problem.

log_ERROR 

Error log message.

Somethning unexpected has happened and the system didn't manage to correct the problem.

Definition at line 104 of file errorlog.h.

             {
    log_NOTE    = 1,
    log_WARNING = 2,
    log_ERROR   = 3
} log_Level_t;


Function Documentation

string log_ErrorStream::GetHeader (  )  const [virtual, inherited]

Reimplemented from log_File.

Definition at line 115 of file log_errorlog.cpp.

References g_cmn, IVD_COUT_LOG_m, ivd_Product::m_nameShort, cmn_Global::prod, and cmn_Time::Time2YMDhms().

                                        {
    IVD_COUT_LOG_m(" log_ErrorStream::GetHeader() ")
    ostringstream sstr;

    cmn_Time time;

    sstr
        << "=============================================" << endl
        << " " << g_cmn.prod.m_nameShort << " Error log file" << endl
        << " Create time : "  << time.Time2YMDhms() << endl
        << "=============================================" << endl << endl;

    return sstr.str();
}

Here is the call graph for this function:

bool log_ErrorStream::IsBroken (  )  const [inline, inherited]

Definition at line 54 of file errorlog.h.

{ return m_broken; };

void IVD_CMN_DECL_d log_Output ( log_File a_os,
log_Level_t  a_level,
int  a_flags,
const string &  a_msg,
log_FunctionTracer a_fcnTrc,
long  a_line 
)

Helper function to prepare output of a log message.

For internal use only.

Internal function to write error msg to output stream.

Used only by log_OUTPUT_m.

Definition at line 134 of file log_errorlog.cpp.

References cmn_Global::dbg, dbg_LOW, log_FunctionTracer::DumpStack(), cmn_Global::evt, g_cmn, log_EventLogger::GetComponent(), log_Debugger::GetFlags(), log_EventLogger::GetQualifier(), cmn_Global::IsDbgActive(), IVD_COUT_LOG_m, ivd_GETTID, log_DBG_m, log_DUMP_STACK, log_ERROR, log_FUNC_m, log_NOTE, log_Output(), log_WARNING, cmn_Global::m_evtReady, log_FunctionTracer::m_fcnArgs_p, log_FunctionTracer::m_fcnID_p, cmn_SysInfo::m_hostName, ivd_Product::m_nameShort, cmn_SysInfo::m_pid, cmn_SysInfo::m_userName, NULL, cmn_Global::prod, log_FunctionID::SetLine(), cmn_Global::si, cmn_Time::Time2YMDhmsm(), and log_File::WriteF().

Referenced by log_Output().

                                               {
    IVD_COUT_LOG_m(" log_ErrorStream::log_Output() ")

    // Output to the error.log must be sequential (atomic).
    static cmn_Mutex errOut_x;
    cmn_MutexLock l (errOut_x);

    cmn_Time m_time;

    ostringstream sstr;

    a_fcnTrc.m_fcnID_p.SetLine(a_line);

    // Compose log file entry header
    sstr << endl << "[";

    switch (a_level) {
        case log_NOTE:
            sstr << "N ";
            break;
        case log_WARNING:
            sstr << "W ";
            break;
        case log_ERROR:
            sstr << "E ";
            break;
        default:
            sstr << "? ";
    }

    if (g_cmn.m_evtReady) {
        sstr
            << g_cmn.evt.GetComponent()
            << "(" << g_cmn.evt.GetQualifier() << ") ,";
    }
    else {
        // g_cmn.evt is not yet constructed --> don't touch it!
        sstr << g_cmn.prod.m_nameShort << "(" << "" << ") ,";
    }
    sstr
        << std::setw(6) << std::setfill('0')
        << g_cmn.si.m_pid
        << "."
        << std::setw(6) << std::setfill('0')
        << ivd_GETTID()
        << " " << m_time.Time2YMDhmsm()
        << "; " << g_cmn.si.m_userName << "@" << g_cmn.si.m_hostName
        << "; " << a_fcnTrc.m_fcnID_p
        << "]"
        << endl;

    // Add error message to the same string stream
    sstr << a_msg << endl;

    if (a_flags & log_DUMP_STACK) {
        log_FunctionTracer::DumpStack(sstr);
    }
    else {
        if (a_fcnTrc.m_fcnArgs_p != NULL)
        {
            sstr
                << endl
                << "Arguments: "
                << *(a_fcnTrc.m_fcnArgs_p)
                << endl;
        }
    }

    // Dump the whole entry to a log file
    sstr << endl;
    a_os.WriteF(sstr.str());

    // Write the error log message to the debugging stream if necessary.
    if (g_cmn.IsDbgActive() && (g_cmn.dbg.GetFlags() & dbg_ERRORLOG) != 0) {
        log_FUNC_m(log_Output);
        log_DBG_m(dbg_LOW, sstr.str());
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

int log_ErrorStream::SetNewPath ( void   )  [inherited]

Definition at line 100 of file log_errorlog.cpp.

References cmn_Global::c_ErrorFileName, cmn_CreatePathNoException(), cmn_Global::dirs, g_cmn, IVD_COUT_LOG_m, ivd_Directories::log, and log_File::m_fileName.

                                   {
    IVD_COUT_LOG_m(" log_ErrorStream::log_ErrorStream() ")
    m_fileName = g_cmn.dirs.log + g_cmn.c_ErrorFileName;

    int result = cmn_CreatePathNoException(cmn_Path(g_cmn.dirs.log));

    if (result != 0) {
        cout
            << "** CRITICAL: log path can't be created: " << g_cmn.dirs.log << endl
            << "Errors will not be logged." << endl
            << "Error: " << result;
    }
    return result;
}

Here is the call graph for this function:

log_ErrorStream::~log_ErrorStream (  )  [virtual, inherited]

Definition at line 95 of file log_errorlog.cpp.

References IVD_COUT_LOG_m, and log_ErrorStream::m_created.

                                 {
    IVD_COUT_LOG_m(" log_ErrorStream::~log_ErrorStream() ")
    m_created = false;
}


Variable Documentation

bool log_ErrorStream::m_broken [private, inherited]

Definition at line 61 of file errorlog.h.

bool log_ErrorStream::m_created = false [static, private, inherited]

Flag to guarantee singleton.

Definition at line 60 of file errorlog.h.

Referenced by log_ErrorStream::log_ErrorStream(), and log_ErrorStream::~log_ErrorStream().