Error logging
[Common modules]

Collaboration diagram for Error logging:

Detailed Description

See also:
File, class and function identification

Debugging

ivdcmn


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


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 171 of file errorlog.h.

Referenced by i_Job_i::ActivateBea(), PreMountsMgr::Add(), i_ResourceManager_i::AddDrive(), i_ManagementInterface_i::AddDrive(), i_ManagementInterface_i::AddLibrary(), 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_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(), 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(), 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(), 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 155 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 78 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 204 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 178 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(), 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(), 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 108 of file errorlog.h.

00108                  {
00110     log_DUMP_STACK  = 1
00111 };

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 90 of file errorlog.h.

00090              {
00092     log_NOTE    = 1,
00096     log_WARNING = 2,
00100     log_ERROR   = 3
00101 } log_Level_t;


Function Documentation

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

Reimplemented from log_File.

Definition at line 101 of file log_errorlog.cpp.

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

00101                                         {
00102     IVD_COUT_LOG_m(" log_ErrorStream::GetHeader() ")
00103     ostringstream sstr;
00104 
00105     cmn_Time time;
00106 
00107     sstr
00108         << "=============================================" << endl
00109         << " " << g_cmn.prod.m_nameShort << " Error log file" << endl
00110         << " Create time : "  << time.Time2YMDhms() << endl
00111         << "=============================================" << endl << endl;
00112 
00113     return sstr.str();
00114 }

Here is the call graph for this function:

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

Definition at line 40 of file errorlog.h.

00040 { 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 120 of file log_errorlog.cpp.

References cmn_Global::dbg, dbg_ERRORLOG, 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().

00123                                                {
00124     IVD_COUT_LOG_m(" log_ErrorStream::log_Output() ")
00125 
00126     // Output to the error.log must be sequential (atomic).
00127     static cmn_Mutex errOut_x;
00128     cmn_MutexLock l (errOut_x);
00129 
00130     cmn_Time m_time;
00131 
00132     ostringstream sstr;
00133 
00134     a_fcnTrc.m_fcnID_p.SetLine(a_line);
00135 
00136     // Compose log file entry header
00137     sstr << endl << "[";
00138 
00139     switch (a_level) {
00140         case log_NOTE:
00141             sstr << "N ";
00142             break;
00143         case log_WARNING:
00144             sstr << "W ";
00145             break;
00146         case log_ERROR:
00147             sstr << "E ";
00148             break;
00149         default:
00150             sstr << "? ";
00151     }
00152 
00153     if (g_cmn.m_evtReady) {
00154         sstr
00155             << g_cmn.evt.GetComponent()
00156             << "(" << g_cmn.evt.GetQualifier() << ") ,";
00157     }
00158     else {
00159         // g_cmn.evt is not yet constructed --> don't touch it!
00160         sstr << g_cmn.prod.m_nameShort << "(" << "" << ") ,";
00161     }
00162     sstr
00163         << std::setw(6) << std::setfill('0')
00164         << g_cmn.si.m_pid
00165         << "."
00166         << std::setw(6) << std::setfill('0')
00167         << ivd_GETTID()
00168         << " " << m_time.Time2YMDhmsm()
00169         << "; " << g_cmn.si.m_userName << "@" << g_cmn.si.m_hostName
00170         << "; " << a_fcnTrc.m_fcnID_p
00171         << "]"
00172         << endl;
00173 
00174     // Add error message to the same string stream
00175     sstr << a_msg << endl;
00176 
00177     if (a_flags & log_DUMP_STACK) {
00178         log_FunctionTracer::DumpStack(sstr);
00179     }
00180     else {
00181         if (a_fcnTrc.m_fcnArgs_p != NULL)
00182         {
00183             sstr
00184                 << endl
00185                 << "Arguments: "
00186                 << *(a_fcnTrc.m_fcnArgs_p)
00187                 << endl;
00188         }
00189     }
00190 
00191     // Dump the whole entry to a log file
00192     sstr << endl;
00193     a_os.WriteF(sstr.str());
00194 
00195     // Write the error log message to the debugging stream if necessary.
00196     if (g_cmn.IsDbgActive() && (g_cmn.dbg.GetFlags() & dbg_ERRORLOG) != 0) {
00197         log_FUNC_m(log_Output);
00198         log_DBG_m(dbg_LOW, sstr.str());
00199     }
00200 }

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

00086                                    {
00087     IVD_COUT_LOG_m(" log_ErrorStream::log_ErrorStream() ")
00088     m_fileName = g_cmn.dirs.log + g_cmn.c_ErrorFileName;
00089 
00090     int result = cmn_CreatePathNoException(cmn_Path(g_cmn.dirs.log));
00091 
00092     if (result != 0) {
00093         cout
00094             << "** CRITICAL: log path can't be created: " << g_cmn.dirs.log << endl
00095             << "Errors will not be logged." << endl
00096             << "Error: " << result;
00097     }
00098     return result;
00099 }

Here is the call graph for this function:

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

Definition at line 81 of file log_errorlog.cpp.

References IVD_COUT_LOG_m, and log_ErrorStream::m_created.

00081                                  {
00082     IVD_COUT_LOG_m(" log_ErrorStream::~log_ErrorStream() ")
00083     m_created = false;
00084 }


Variable Documentation

bool log_ErrorStream::m_broken [private, inherited]

Definition at line 47 of file errorlog.h.

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

Flag to guarantee singleton.

Definition at line 46 of file errorlog.h.

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


Generated on Mon Feb 27 18:55:16 2012 for OPENARCHIVE by  doxygen 1.5.6