ddc
|
#include <string>
Go to the source code of this file.
Macros | |
#define | concord_daemon_log_files ddcLogToFiles |
pre-v2.1 compatible alias for ddcLogToFiles More... | |
#define | concord_daemon_log_stderr ddcLogToStderr |
pre-v2.1 compatible alias for ddcLogToStderr More... | |
#define | concord_daemon_log_syslog ddcLogToSyslog |
pre-v2.1 compatible alias for ddcLogToSyslog More... | |
#define | ddcLogIf(Test, Msg) if (Test) ddcLog(Msg) |
#define | ddcLogError(Msg) ddcLogIf((ddcLogLevel >= ddcLLError),Msg) |
#define | ddcLogWarn(Msg) ddcLogIf((ddcLogLevel >= ddcLLWarn),Msg) |
#define | ddcLogInfo(Msg) ddcLogIf((ddcLogLevel >= ddcLLInfo),Msg) |
#define | ddcLogDebug(Msg) ddcLogIf((ddcLogLevel >= ddcLLDebug),Msg) |
#define | ddcLogTrace(Msg) ddcLogIf((ddcLogLevel >= ddcLLTrace),Msg) |
#define | ddcLogDie(Msg) { ddcLogError(Msg); abort(); } |
Typedefs | |
typedef int | DDCLogLevel |
typedef DDCLogLevel | ProtocolDensityEnum |
Functions | |
DDCLogLevel | GetLogLevel (const std::string &Name) |
const char * | LogLevelName (DDCLogLevel Level) |
DDCLogLevel | SetLogLevel (DDCLogLevel Level) |
void | ddcLog (const std::string &msg) |
write a single log-message, implicitly appending a newline More... | |
void | concord_daemon_log (const std::string &t) |
pre-v2.1 compatible alias for ddcLog() More... | |
Variables | |
const DDCLogLevel | ddcLLUnknown |
const DDCLogLevel | ddcLLSilent |
const DDCLogLevel | ddcLLError |
const DDCLogLevel | ddcLLWarn |
const DDCLogLevel | ddcLLInfo |
const DDCLogLevel | ddcLLDebug |
const DDCLogLevel | ddcLLTrace |
const DDCLogLevel | pdWeakDensity |
const DDCLogLevel | pdMediumDensity |
const DDCLogLevel | pdHeavyDensity |
bool | ddcLogToFiles |
bool: whether to output log messages to local log-files REGISTRY("Software\\Dialing\\Logs\\Main")/log/concord/YYYY-MM-DD.log (default=true) More... | |
bool | ddcLogToStderr |
bool: whether to output log messages on stderr (default=false) More... | |
bool | ddcLogToSyslog |
bool: whether to output log messages via syslog (default=false) More... | |
DDCLogLevel | ddcLogLevel |
global log-level More... | |
#define concord_daemon_log_files ddcLogToFiles |
pre-v2.1 compatible alias for ddcLogToFiles
Referenced by ddcLog().
#define concord_daemon_log_stderr ddcLogToStderr |
pre-v2.1 compatible alias for ddcLogToStderr
Referenced by ddcLog().
#define concord_daemon_log_syslog ddcLogToSyslog |
pre-v2.1 compatible alias for ddcLogToSyslog
Referenced by ddcLog().
#define ddcLogIf | ( | Test, | |
Msg | |||
) | if (Test) ddcLog(Msg) |
macro to conditionally log a message; only evaluates Msg if Test is true
#define ddcLogError | ( | Msg | ) | ddcLogIf((ddcLogLevel >= ddcLLError),Msg) |
conditionally log an error-message if ddcLogLevel >= ddcLLError
Referenced by ConcIndexatorInvoker::BuildIndex(), CHost::ClientError(), CHost::CloseListenSocket(), CFreeBiblStringIndex::ConvertAndSaveToDiskAfterIndexing(), do_start(), CConcSession::GetHits(), CConcSession::GetOccurrences(), CHost::GetRequest(), CDDCBranchServer::handle__run_query(), CHost::HandleClientConnection(), CHost::HandleSocketError(), ConcIndexatorInvoker::IndexFile(), InitMorphologySystem(), ListenerThread(), CDDCLeafServer::LoadHolder(), LoadLocalCorpora(), CDDCServer::ProcessSocketString(), puke(), CHost::RunThread(), CHost::SendResponse(), CConcSession::SimpleQuery(), and CFreeBiblStringIndex::WriteBiblStringItems().
#define ddcLogWarn | ( | Msg | ) | ddcLogIf((ddcLogLevel >= ddcLLWarn),Msg) |
conditionally log a warning-message if ddcLogLevel >= ddcLLWarn
Referenced by CHost::CloseListenSocket(), create_unix_socket(), CConcIndexator::CreateAsUnion(), CHost::CreateSocket(), CFreeBiblStringConstant::CreateUnion(), ddcMapFile< DWORD, DWORD >::ensureMap(), ddcStringEnum< OffT_ >::ensureVec(), ddcCorpusList< OffT_ >::ensureVec(), ddcVecFile< CIndexItem >::ensureVec(), ConcIndexatorInvoker::IndexFile(), CStringIndexator::IndexOneToken(), CStringIndexator::IndexTokenFixLongColumns(), CConcordance::LoadCorpusFiles(), LoadDDCServer(), CIndexSetForQueryingStage::LoadIndexSet(), CDDCServerOptions::LoadLines(), CConcordance::LoadMaskedFiles(), CConcordance::LoadOptionsFromString(), CConcordance::LoadSourceFilesAndOptions(), ddcMMap< CIndexItem >::open(), ddcStringEnum< OffT_ >::open(), ddcCorpusList< OffT_ >::open(), CDDCServer::ProcessSocketString(), CDDCBranchServer::ReadSelectedHosts(), CFreeBiblStringIndex::RegisterBiblStringItemId(), CBiblIndex::RegisterFreeBiblAttributes(), CStringIndexator::RegisterIndexAlias(), CStringIndexator::RegisterIndexAliases(), CConcIndexator::RollbackIndexOneFile(), CDDCServerThread::run(), CBibliography::Sanitize(), SanitizeBiblString(), CDDCServerOptions::Set(), CDDCServer::SetOptions(), CConcSession::SortKeyLB(), CConcXml::SplitBibliography(), CConcIndexator::SplitProject(), TrimTruncateV(), and CConcXml::UnionBibliographies().
#define ddcLogInfo | ( | Msg | ) | ddcLogIf((ddcLogLevel >= ddcLLInfo),Msg) |
conditionally log an info-message if ddcLogLevel >= ddcLLInfo
Referenced by CConcIndexator::CreateAsUnion(), CHost::CreateListener(), do_start(), InitConcordDicts(), CDDCLeafServer::LoadHolder(), LoadLocalCorpora(), CDDCServer::ProcessSocketString(), CHost::RunThread(), CDDCServer::SetOptions(), CDDCBranchServer::SetOptions(), CDDCLeafServer::Shutdown(), CDDCServer::Shutdown(), CDDCBranchServer::Shutdown(), ShutdownServerSockets(), CConcXml::SplitBibliography(), CConcIndexator::SplitProject(), CDDCServerThreadPool::start(), CDDCServer::StartClientThreads(), termination_handler(), and CConcXml::UnionBibliographies().
#define ddcLogDebug | ( | Msg | ) | ddcLogIf((ddcLogLevel >= ddcLLDebug),Msg) |
conditionally log a debug-message if ddcLogLevel >= ddcLLDebug
Referenced by CDDCBranchServer::AlignCorpusPath(), ConcIndexatorInvoker::BuildIndex(), TxCab::compile(), CFreeBiblStringIndex::CreatePartitions(), CFreeBiblStringConstant::CreatePartitions(), CFreeBiblStringIndex::CreateUnion(), do_start(), CConcSession::GenerateCountStrings(), CConcSession::GetAllHits(), CDDCBranchServer::GetFirstHitsFromCorpora(), CDDCBranchServer::GetHitContexts(), CConcSession::GetHits(), CDDCLeafServer::handle__get_first_hits(), CDDCLeafServer::handle__run_query(), CTabFormatIndexator::IndexTabFormat(), InitMorphologySystem(), LoadDDCServer(), CDDCLeafServer::LoadHolder(), CConcordance::LoadMaskedFiles(), CConcordance::LoadOptionsFromString(), ddcStringEnum< OffT_ >::open(), ddcCorpusList< OffT_ >::open(), CDocumentIterator::ReadTabFormatDocument(), CDDCServerThread::run(), CDDCBranchServer::RunGetFirstHits(), CDDCServer::Shutdown(), CStringIndexSet::UnionIndexSets(), CDDCBranchServer::UpdateNavCache(), and CIndexSetForQueryingStage::WritePeriodsDivision().
#define ddcLogTrace | ( | Msg | ) | ddcLogIf((ddcLogLevel >= ddcLLTrace),Msg) |
conditionally log a trace-message if ddcLogLevel >= ddcLLTrace
Referenced by CloseSocketRef(), CStringIndexSet::CreateSplitPartitions(), CHost::GetRequest(), CDDCLeafServer::handle__get_first_hits(), CDDCServer::HandleClientConnection(), NavHintCache::insert(), NavHintCache::lower_bound(), ddcVecFile< CIndexItem >::open(), CTabFormatIndexator::ProcessMetaField(), CHost::SendResponse(), and CConcXml::SplitBibliography().
#define ddcLogDie | ( | Msg | ) | { ddcLogError(Msg); abort(); } |
wrapper for ddcLogError() and abort()
Referenced by CIndexSetForQueryingStage::AddOneIndexItem().
typedef int DDCLogLevel |
typedef for a log-level (formerly ProtocolDensityEnum)
typedef DDCLogLevel ProtocolDensityEnum |
typedef alias for unintuitively-named pre-v2.1 log-level enum
DDCLogLevel GetLogLevel | ( | const std::string & | Name | ) |
convert a string to a ddc log-level
References ddcLLDebug, ddcLLError, ddcLLInfo, ddcLLSilent, ddcLLTrace, ddcLLUnknown, ddcLLWarn, EngMakeLower(), Format(), pdHeavyDensity, pdMediumDensity, pdWeakDensity, and Trim().
Referenced by main(), and CDDCServerOptions::Set().
const char* LogLevelName | ( | DDCLogLevel | Level | ) |
convert a log-level to a string
References ddcLLTrace, ddcLLUnknown, and DDCLogLevelName.
Referenced by do_start(), and CDDCServerOptions::toString().
DDCLogLevel SetLogLevel | ( | DDCLogLevel | Level | ) |
set global log-level; returns old log-level
References ddcLogLevel, and ddcLogMutex.
Referenced by do_start(), main(), and CDDCServer::SetOptions().
void ddcLog | ( | const std::string & | msg | ) |
write a single log-message, implicitly appending a newline
Referenced by concord_daemon_log().
|
inline |
pre-v2.1 compatible alias for ddcLog()
References ddcLog().
Referenced by CConcSessionContext::CacheGet(), TxCab::expand(), CConcSession::GetAllHits(), CDDCBranchServer::GetFirstHitsFromCorpora(), CDDCBranchServer::GetHitStringsFromOneCorpus(), CDDCBranchServer::RunGetFirstHits(), CConcSession::SaveOccurrences(), and CConcSession::WorkerClone().
const DDCLogLevel ddcLLUnknown |
Referenced by do_start(), GetLogLevel(), LogLevelName(), and CDDCServer::SetOptions().
const DDCLogLevel ddcLLSilent |
Referenced by GetLogLevel().
const DDCLogLevel ddcLLError |
Referenced by GetLogLevel().
const DDCLogLevel ddcLLWarn |
Referenced by GetLogLevel().
const DDCLogLevel ddcLLInfo |
Referenced by do_start(), GetLogLevel(), and main().
const DDCLogLevel ddcLLDebug |
Referenced by CDDCBranchServer::CDDCBranchServer(), EchoOption(), EchoOptionLines(), and GetLogLevel().
const DDCLogLevel ddcLLTrace |
Referenced by GetLogLevel(), LogLevelName(), CDDCServer::ProcessSocketString(), and CHost::SendResponse().
const DDCLogLevel pdWeakDensity |
constant aliases for unintuitively-named pre-v2.1 log-levels
Referenced by GetLogLevel().
const DDCLogLevel pdMediumDensity |
Referenced by GetLogLevel().
const DDCLogLevel pdHeavyDensity |
Referenced by GetLogLevel().
bool ddcLogToFiles |
bool: whether to output log messages to local log-files REGISTRY("Software\\Dialing\\Logs\\Main")/log/concord/YYYY-MM-DD.log (default=true)
Referenced by do_start(), and main().
bool ddcLogToStderr |
bool: whether to output log messages on stderr (default=false)
Referenced by do_start(), and main().
bool ddcLogToSyslog |
bool: whether to output log messages via syslog (default=false)
Referenced by do_start(), and main().
DDCLogLevel ddcLogLevel |
global log-level
Referenced by CDDCBranchServer::CDDCBranchServer(), do_start(), EchoOption(), EchoOptionLines(), main(), CDDCServer::ProcessSocketString(), CHost::SendResponse(), and SetLogLevel().