Classes | Defines | Enumerations | Functions

Event logging
[Common modules]

Logging of history of events in an IVD System. More...

Collaboration diagram for Event logging:

Classes

class  log_EventLog
 A class to initialize event logging in each of the processes. More...
class  log_EventLogger

Defines

#define log_WriteErrorEvent(_stream)
 Macro definition to write an error stream into the message log.
#define log_WriteCriticalEvent(_stream)
 Macro definition to write a critical message into the message log.
#define log_WriteWarningEvent(_stream)
 Macro definition to write an warning into the message log.
#define log_WriteInfoEvent(_stream)
 Macro definition to write an info stream into the message log.

Enumerations

enum  log_Component_e {
  cmp_UNKNOWN = 0, cmp_HSM = 1,
  cmp_FSEVTMGR = 2, cmp_SVC = 3,
  cmp_PM = 4, cmp_RM = 5,
  cmp_MIF = 6, cmp_LAS = 7,
  cmp_LAM = 8, cmp_BEA = 9,
  cmp_CLI = 10, cmp_DD = 11,
  cmp_API = 12
}
enum  evt_Status_e {
  evt_INFO = 0, evt_WARNING = 1,
  evt_ERROR = 2, evt_CRITICAL = 3
}
 

Status of the event log message by the impact that the event has on the IVD system.

More...

Functions

void IVD_CMN_DECL_d log_WriteEvent (string a_message, const string &a_subcomponent="", UInt64_t a_jobID=0, const string &a_secID="")
 Function to write an entry into the IVD Linux event logging facility.
void IVD_CMN_DECL_d log_WriteEvent (evt_Status_e a_status, string a_message, const string &a_subcomponent="", UInt64_t a_jobID=0, const string &a_secID="")
 Function to write an entry into the IVD Linux event logging facility.
const char * cmn_GetComponentName (log_Component_e a_componentID)
 Get a string representation of IVD Linux component from its ID.

Detailed Description

Logging of history of events in an IVD System.

See also:
File, class and function identification
Error logging
ivdcmn Error logging and debugging

Define Documentation

#define log_WriteCriticalEvent (   _stream  ) 
Value:
{ \
    ostringstream sStr; \
    sStr << _stream << ends; \
    log_WriteEvent(evt_CRITICAL, sStr.str()); \
}

Macro definition to write a critical message into the message log.

Definition at line 165 of file eventlog.h.

#define log_WriteErrorEvent (   _stream  ) 
#define log_WriteInfoEvent (   _stream  ) 
Value:
{ \
    ostringstream sStr; \
    sStr << _stream << ends; \
    log_WriteEvent(evt_INFO, sStr.str()); \
}

Macro definition to write an info stream into the message log.

Definition at line 179 of file eventlog.h.

#define log_WriteWarningEvent (   _stream  ) 
Value:
{ \
    ostringstream sStr; \
    sStr << _stream << ends; \
    log_WriteEvent(evt_WARNING, sStr.str()); \
}

Macro definition to write an warning into the message log.

Definition at line 172 of file eventlog.h.


Enumeration Type Documentation

Status of the event log message by the impact that the event has on the IVD system.

Enumerator:
evt_INFO 

Informational, statistical message.

evt_WARNING 

Warning level: Administrator should reconfigure parameters of the IVD.

evt_ERROR 

Error level: Unexpected situation, something is broken or similar.

evt_CRITICAL 

Critical error level: RMDB missing or corrupt, binaries missing, FSC corrupted or similar.

Definition at line 67 of file eventlog.h.

             {
    evt_INFO        = 0,

    evt_WARNING     = 1,

    evt_ERROR       = 2,

    evt_CRITICAL    = 3
} evt_Status_e;

Enumerator:
cmp_UNKNOWN 
cmp_HSM 
cmp_FSEVTMGR 
cmp_SVC 
cmp_PM 
cmp_RM 
cmp_MIF 
cmp_LAS 
cmp_LAM 
cmp_BEA 
cmp_CLI 
cmp_DD 
cmp_API 

Definition at line 47 of file eventlog.h.

             {
    cmp_UNKNOWN     = 0,
    cmp_HSM         = 1,
    cmp_FSEVTMGR    = 2,
    cmp_SVC         = 3,
    cmp_PM          = 4,
    cmp_RM          = 5,
    cmp_MIF         = 6,
    cmp_LAS         = 7,
    cmp_LAM         = 8,
    cmp_BEA         = 9,
    cmp_CLI         = 10,
    cmp_DD          = 11,
    cmp_API         = 12
} log_Component_e;


Function Documentation

const char* cmn_GetComponentName ( log_Component_e  a_componentID  ) 

Get a string representation of IVD Linux component from its ID.

Definition at line 304 of file log_eventlogger.cpp.

References cmp_UNKNOWN, g_cmn, ivd_Product::m_nameShort, cmn_ComponentName_t::name, and cmn_Global::prod.

Referenced by log_EventLogger::GetComponent(), and log_EventLogger::Write().

                                                                {
    for (int i = 0; ; i++) {
        if (g_componentTable[i].id == cmp_UNKNOWN) {
            return g_cmn.prod.m_nameShort.c_str();
        }
        else if (g_componentTable[i].id == a_componentID) {
            return g_componentTable[i].name;
        }
    };
    return NULL;
}

Here is the caller graph for this function:

void IVD_CMN_DECL_d log_WriteEvent ( string  a_message,
const string &  a_subcomponent = "",
UInt64_t  a_jobID = 0,
const string &  a_secID = "" 
)

Function to write an entry into the IVD Linux event logging facility.

Parameters:
a_message Contents of one event log message
a_subcomponent [Optional] name of the subcomponent (thread name, job type, library name)
a_jobID [Optional] Job ID
a_secID [Optional] secondary ID (Media Volume ID, File ID, ...)

Definition at line 116 of file log_eventlogger.cpp.

References cmn_Global::evt, evt_INFO, g_cmn, IVD_COUT_LOG_m, and log_EventLogger::Write().

Referenced by i_FSCCheckJob_i::AbortJob(), i_Job_i::ActivateBea(), i_HSM_i::ActivateFiles(), i_ManagementInterface_i::AddDrive(), i_ManagementInterface_i::AddLibrary(), i_ResourceManager_i::AddMajorCol(), i_ManagementInterface_i::AddMedium(), i_ManagementInterface_i::AddMediumToPool(), hsm_HL7CacheFile::AddMessageToCache(), i_ManagementInterface_i::AddPartition(), i_ManagementInterface_i::AddPool(), rm_Queue::Allocate(), rm_Operator::AllocateAdmin(), rm_Operator::AllocateMigCollocation(), bea_DupWriteThread::AppendVolume(), i_MediumDupl_i::AssignResources(), df_FRI::BlockWritten(), bea_TapeMedium::ChangeVolume(), bea_DiskMedium::ChangeVolume(), rm_Operator::CheckAndAdd(), scsi_LnxSG::CheckDriverStatus(), rm_Operator::CheckForAnyResourceForMig(), bea_MigrationThread::CheckFRI(), bea_FRIThread::CheckFRI(), pm_JobMgr::CheckFSCvsIVDFS(), i_HSM_i::CheckFSCvsIVDFS(), scsi_LnxSG::CheckHostStatus(), i_AdminJob_i::CheckPartition(), i_MaintFriJob_i::CheckReadFri(), CheckRootMembersForEA(), scsi_IO::CheckStatusAndSense(), i_MediumDupl_i::CheckTargetMedium(), i_AdminJob_i::CheckVolumesForFormatAndInit(), i_AdminJob_i::CheckVolumesForFriMicJob(), i_AdminJob_i::CheckVolumesForVolumeClose(), i_FSC_i::ChkLastFileID(), rm_DiskBuffer::Clear(), i_AdminJob_i::CloseVolume(), bea_FRI::CloseVolume(), bea_FRI::CloseVolumeInRMDB(), i_ThreadJob_i::CompleteJob(), i_ReorgJob_i::CompleteJob(), i_MigrationJob_i::CompleteJob(), i_MediumDupl_i::CompleteJob(), i_MediumCheckJob_i::CompleteJob(), i_MaintFriJob_i::CompleteJob(), rm_DB::Connect(), i_HSM_i::Continue(), i_FSC_i::Continue(), fio_DataBase::Continue(), cfg_HL7Info::ConvertGroup(), cfg_CollocationInfo::ConvertGroup(), bea_FRI::CopyFromDiskToMedium(), bea_FRI::CreateFRI(), pm_JobMgr::CreateFSCRecoveryJob(), PreMountsMgr::Del(), ivd_Delay::Delay(), bea_FRI::DeleteFRIOnDisk(), bea_FRI::DeleteFRIOnVolume(), i_AdminJob_i::DetectVolumeHeader(), rm_DiskBufAllocator::DetectVolumes(), i_ManagementInterface_i::DisableDrive(), i_ManagementInterface_i::DisableLibrary(), i_ManagementInterface_i::DisablePartition(), i_HSM_i::DoDeletion(), i_AdminJob_i::DoInitialize(), i_HSM_i::DoMigrationJob(), i_HSM_i::EfficientRecall(), la_SCSILibrary::EjectMedium(), i_ManagementInterface_i::EnableDrive(), i_ManagementInterface_i::EnableLibrary(), i_ManagementInterface_i::EnablePartition(), bea_FRIThread::EraseSysVol(), fs_api::EventDismounted(), fs_api::EventMounted(), hsm_FileHeader::EventOffline(), fs_api::EventPredismount(), i_VvCopyJob_i::Execute(), i_Service_i::Execute(), i_ReorgScanJob_i::Execute(), i_ReorgJob_i::Execute(), i_RedundantCopyJob_i::Execute(), i_RecreatedIVDFSJob_i::Execute(), i_RecallJob_i::Execute(), i_MigrationJob_i::Execute(), i_MediumDupl_i::Execute(), i_DelExpiredFilesJob_i::Execute(), i_AdminJob_i::Execute(), i_Service_i::ExecutePy(), i_PartitionManager_i::FillClientCfg(), fio_JourMgr::fio_JourMgr(), i_HSM_i::ForceMigration(), i_HSM_i::ForceRelease(), i_BackEndAgent_i::Format(), i_AdminJob_i::Format(), bea_TapeMedium::Format(), i_FSC_i::FSCRecovery(), rm_Operator::GetBestCopy(), fsc_DataL::GetCopiesPos(), hsm_FHmigc::GetFileIDs(), api_Partition::GetPartitionStatus(), la_SCSILibrary::HandleDriveError(), i_BackEndAgent_i::HandleError(), hsm_HL7CacheFile::hsm_HL7CacheFile(), i_BackupJob_i::i_BackupJob_i(), i_EfficientRecallJob_i::i_EfficientRecallJob_i(), i_FSC_i::i_FSC_i(), i_LibraryAgentSCSI_i::i_LibraryAgentSCSI_i(), i_ManagementInterface_i::i_ManagementInterface_i(), i_MediumCheckJob_i::i_MediumCheckJob_i(), i_MediumDupl_i::i_MediumDupl_i(), i_MigrationJob_i::i_MigrationJob_i(), i_PartitionManager_i::i_PartitionManager_i(), i_RecallJob_i::i_RecallJob_i(), i_ReorgJob_i::i_ReorgJob_i(), i_ThreadJob_i::i_ThreadJob_i(), ClientConf_t::Init(), i_BackEndAgent_i::Init(), i_AdminJob_i::Initialize(), i_ReorgJob_i::InitializeSingleVolume(), i_AdminJob_i::InitializeSingleVolume(), i_ReorgJob_i::InitializeVolumes(), la_SCSILibrary::Inventory(), i_LibraryAgentSCSI_i::Inventory(), rm_Operator::InventoryUpdate(), scsi_IO::IOCtl(), fio_uvListMgr::IsElemInBuffer(), hsm_Recall::IsFileFromDFforRecall(), ivd_InternalError::ivd_InternalError(), i_HSM_i::IVDFSPrepareRecovery(), i_FSC_i::IVDFSRecoveryAbort(), i_LibraryAgentSCSI_i::Load(), i_LibraryAgentManual_i::Load(), i_Job_i::LoadUnload(), log_EventLog::log_EventLog(), cfg_CliBase::LogCommand(), i_BackEndAgent_i::LogStats(), main(), rm_Operator::MajorColIdMatches(), i_ManagementInterface_i::MarkMediumGood(), i_ManagementInterface_i::MarkMediumOffline(), i_ManagementInterface_i::MarkMediumOnline(), i_ManagementInterface_i::MarkMediumUnreliable(), i_ManagementInterface_i::MarkMediumUnusable(), i_ReorgJob_i::MediumOperationComplete(), i_RedundantCopyJob_i::MediumOperationComplete(), i_MigrationJob_i::MediumOperationComplete(), i_MediumDupl_i::MediumOperationComplete(), i_MaintFriJob_i::MediumOperationComplete(), i_EfficientRecallJob_i::MediumOperationComplete(), bea_MigrationThread::Migrate(), i_HSM_i::MigrateByAPI(), hsm_JobListMgr::MigrateFailedJob(), i_ReorgJob_i::MigrateFiles(), i_RedundantCopyJob_i::MigrateFiles(), i_ManagementInterface_i::Mount(), nsc_ScanForIVDFSRecovery(), la_SCSILibrary::Open(), bea_TapeDrive::Open(), i_AdminJob_i::OperateLA(), i_HSM_i::PackFile(), df_BlockProxy::ParseBlockHeader(), fsc_CollectorRedunCopy::PostCopiesProc(), i_MediumDupl_i::PreFormat(), i_RedundantCopyJob_i::Prepare(), i_MaintFriJob_i::PrepareMedium(), bea_MigrationThread::PrepareVolume(), df_Filter::ProcBlock(), dbo_LibraryStatusClear::Process(), dbo_LibraryStatusSet::Process(), dbo_DriveStatusClear::Process(), dbo_DriveStatusSet::Process(), dbo_MedVolStatusClear::Process(), dbo_MedVolStatusSet::Process(), dbo_MediumStatusClear::Process(), dbo_MediumStatusSet::Process(), dbo_MediumUnusable::Process(), dbo_MediumUnreliable::Process(), dbo_DriveError::Process(), i_MediumDupl_i::Process(), i_MaintFriJob_i::Process(), i_RecoveryJob_i::ProcessFRI(), i_MediumCheckJob_i::ProcessFRI(), df_SplitInfoUnpacker::ProcRecBSEnd(), hsm_Recall::ProcRecBSStart(), hsm_Recall::ProcRecEmbData(), hsm_Recall::ProcRecRawData(), bea_FRIThread::ReadFRI(), bea_FRI::ReadFRI(), bea_FRI::ReadFRIStart(), hsm_HL7CacheFile::ReadNextFile(), i_ReorgJob_i::ReadSourceVolume(), i_HSM_i::Recall(), hsm_FHADPRecall::RecallFileFromADP(), i_ReorgJob_i::RecallFiles(), i_RedundantCopyJob_i::RecallFiles(), i_LibraryAgentSCSI_i::Reconfigure(), i_PartitionManager_i::RecoveryModeClear(), i_PartitionManager_i::RecoveryModeSet(), i_AdminJob_i::RecreateFRIandMIC(), i_PartitionManager_i::RegisterHSM(), i_FSC_i::ReleaseVolEntries(), i_BackupJob_i::Remove(), i_ManagementInterface_i::RemoveDrive(), i_ManagementInterface_i::RemoveLibrary(), i_ManagementInterface_i::RemoveMedium(), i_ManagementInterface_i::RemovePartition(), i_ManagementInterface_i::RemovePool(), TreeWalk::Report(), rm_DiskBuffer::ReportContent(), hsm_HL7MessageProxy::ReportInvalidHL7Configuration(), i_Job_i::RequestDiskBuffer(), bea_TapeVolume::Rewind(), bea_DiskVolume::Rewind(), rm_DiskBuffer::rm_DiskBuffer(), FSEvMgrThrd::Run(), pm_RecallClientThread::Run(), ivd_DD::Run(), bea_VolumeReader::Run(), bea_RecallThread::Run(), bea_MigrationThread::Run(), bea_DupReadThread::Run(), bea_FRIThread::Run(), hsm_HL7MessageProxy::RunUndetached(), bea_TapeVolume::SeekBlock(), bea_DiskVolume::SeekBlock(), bea_TapeVolume::SeekEOD(), bea_DiskVolume::SeekEOD(), bea_TapeVolume::SeekFileMark(), bea_DiskVolume::SeekFileMark(), rm_Operator::SelectDriveForMig(), hl7::SendBlock(), SendEmail(), hsm_HL7MessageProxy::SendMessages(), SendMsg(), i_FsEvMgr_i::SendReply(), hsm_FHmigc::SendToPM(), bea_Medium::SetBarcode(), i_ManagementInterface_i::SetHl7Info(), i_ReorgJob_i::SetResourceBusyStatus(), i_RedundantCopyJob_i::SetResourceBusyStatus(), i_MediumDupl_i::SetResourceBusyStatus(), i_AdminJob_i::SetResourceBusyStatus(), STapeOpen(), i_AdminJob_i::StartBEA(), i_HSM_i::Suspend(), i_FSC_i::Suspend(), TreeWalk::TreeWalk(), i_HSM_i::TrigMigration(), i_HSM_i::TrigRecall(), hsm_FHrelc::TruncationCheck(), i_ManagementInterface_i::Umount(), i_LibraryAgentSCSI_i::Unload(), i_LibraryAgentManual_i::Unload(), i_HSM_i::UnPackFile(), rm_Operator::UpdateCollocation(), i_ManagementInterface_i::UpdateDrive(), i_BackEndAgent_i::UpdateDriveIDs(), i_LibraryAgentSCSI_i::UpdateIDs(), i_ManagementInterface_i::UpdateLibrary(), i_ResourceManager_i::UpdateMajorCol(), bea_Volume::UpdateMediumMem(), i_ManagementInterface_i::UpdatePartition(), i_ManagementInterface_i::UpdatePool(), i_ManagementInterface_i::UpdateSystemCfg(), i_BackEndAgent_i::UseResources(), bea_FRI::VerifyExistenceOfFileMark(), i_BackEndAgent_i::VerifyIDs(), rm_Operator::VolumeFull(), bea_TapeVolume::WriteFileMarks(), bea_DiskVolume::WriteFileMarks(), bea_FRI::WriteFRI(), fsc_CollectorRedunCopy::~fsc_CollectorRedunCopy(), i_AdminJob_i::~i_AdminJob_i(), i_Job_i::~i_Job_i(), i_MaintFriJob_i::~i_MaintFriJob_i(), i_MigrationJob_i::~i_MigrationJob_i(), i_RedundantCopyJob_i::~i_RedundantCopyJob_i(), and log_EventLog::~log_EventLog().

                              {
    IVD_COUT_LOG_m(" log_WriteEvent evt_INFO " << a_message )

    g_cmn.evt.Write(a_message, a_subcomponent, a_jobID, a_secID, evt_INFO);

}

Here is the call graph for this function:

void IVD_CMN_DECL_d log_WriteEvent ( evt_Status_e  a_status,
string  a_message,
const string &  a_subcomponent = "",
UInt64_t  a_jobID = 0,
const string &  a_secID = "" 
)

Function to write an entry into the IVD Linux event logging facility.

Parameters:
a_status Status of the reported event (see evt_Status_e)
a_message Contents of one event log message
a_subcomponent [Optional] name of the subcomponent (thread name, job type, library name)
a_jobID [Optional] Job ID
a_secID [Optional] secondary ID (Media Volume ID, File ID, ...)

Definition at line 128 of file log_eventlogger.cpp.

References cmn_Global::evt, g_cmn, IVD_COUT_LOG_m, and log_EventLogger::Write().

                              {
    IVD_COUT_LOG_m(" log_WriteEvent " << a_message )

    g_cmn.evt.Write(a_message, a_subcomponent, a_jobID, a_secID, a_status);

}

Here is the call graph for this function: