![]() |
XRootD
|
Handle diagnostics. More...
#include <XrdClLog.hh>
Public Types | |
enum | LogLevel { NoMsg = 0 , ErrorMsg = 1 , WarningMsg = 2 , InfoMsg = 3 , DebugMsg = 4 , DumpMsg = 5 } |
Log levels. More... | |
Public Member Functions | |
Log () | |
Constructor. More... | |
~Log () | |
void | Debug (uint64_t topic, const char *format,...) |
Print a debug message. More... | |
void | Dump (uint64_t topic, const char *format,...) |
Print a dump message. More... | |
void | Error (uint64_t topic, const char *format,...) |
Report an error. More... | |
LogLevel | GetLevel () const |
Get the log level. More... | |
void | Info (uint64_t topic, const char *format,...) |
Print an info. More... | |
uint64_t | RegisterTopic (const std::string &topic) |
Register new topic. More... | |
void | Say (LogLevel level, uint64_t topic, const char *format, va_list list) |
void | SetLevel (const std::string &level) |
Set the level of the messages that should be sent to the destination. More... | |
void | SetLevel (LogLevel level) |
Set the level of the messages that should be sent to the destination. More... | |
void | SetMask (const std::string &level, uint64_t mask) |
Sets the mask for the topics of messages that should be printed. More... | |
void | SetMask (LogLevel level, uint64_t mask) |
Sets the mask for the topics of messages that should be printed. More... | |
void | SetOutput (LogOut *output) |
Set the output that should be used. More... | |
void | SetPid (pid_t pid) |
Set pid. More... | |
void | SetTopicName (uint64_t topic, std::string name) |
Map a topic number to a string. More... | |
void | Warning (uint64_t topic, const char *format,...) |
Report a warning. More... | |
Handle diagnostics.
Definition at line 100 of file XrdClLog.hh.
enum XrdCl::Log::LogLevel |
Log levels.
Enumerator | |
---|---|
NoMsg | report nothing |
ErrorMsg | report errors |
WarningMsg | report warnings |
InfoMsg | print info |
DebugMsg | print debug info |
DumpMsg | print details of the request and responses |
Definition at line 106 of file XrdClLog.hh.
|
inline |
|
inline |
Definition at line 130 of file XrdClLog.hh.
void XrdCl::Log::Debug | ( | uint64_t | topic, |
const char * | format, | ||
... | |||
) |
Print a debug message.
Definition at line 282 of file XrdClLog.cc.
References DebugMsg, GetLevel(), likely, Say(), and unlikely.
Referenced by XrdCl::Channel::Channel(), XrdCl::ClassicCopyJob::ClassicCopyJob(), XrdCl::HttpFilePlugIn::HttpFilePlugIn(), XrdCl::HttpFileSystemPlugIn::HttpFileSystemPlugIn(), XrdCl::Stream::Stream(), XrdCl::ThirdPartyCopyJob::ThirdPartyCopyJob(), XrdCl::TPFallBackCopyJob::TPFallBackCopyJob(), XrdCl::XRootDMsgHandler::XRootDMsgHandler(), XrdCl::Stream::~Stream(), XrdCl::XRootDMsgHandler::~XRootDMsgHandler(), XrdCl::PollerBuiltIn::AddSocket(), XrdCl::FileStateHandler::AfterForkChild(), XrdCl::CheckSumManager::Calculate(), XrdCl::AsyncSocketHandler::CheckHSWait(), XrdCl::FileStateHandler::Checkpoint(), XrdCl::Utils::CheckTPC(), XrdCl::Utils::CheckTPCLite(), child(), XrdCl::ForkHandler::Child(), XrdCl::FileStateHandler::ChkptWrt(), XrdCl::FileStateHandler::ChkptWrtV(), XrdCl::AsyncSocketHandler::Close(), XrdCl::HttpFilePlugIn::Close(), XrdCl::FileStateHandler::Close(), XrdCl::AsyncSocketHandler::Connect(), XrdCl::PollerFactory::CreatePoller(), XrdCl::FileStateHandler::DelXAttr(), XrdCl::HttpFileSystemPlugIn::DirList(), DoLS(), XrdCl::AsyncSocketHandler::DoTlsHandShake(), XrdCl::FSExecutor::Execute(), XrdCl::FileStateHandler::Fcntl(), XrdCl::Stream::ForceError(), XrdCl::InQueue::GetHandlerForMessage(), XrdCl::Env::GetInt(), XrdCl::DefaultEnv::GetMonitor(), XrdCl::Env::GetString(), XrdCl::FileStateHandler::GetXAttr(), XrdCl::AsyncSocketHandler::HandleHandShake(), IndexRemote(), XrdCl::FileStateHandler::ListXAttr(), XrdCl::Utils::LogHostAddresses(), XrdCl::HttpFileSystemPlugIn::MkDir(), XrdCl::XRootDTransport::MultiplexSubStream(), XrdCl::HttpFileSystemPlugIn::Mv(), XrdCl::FileStateHandler::OnClose(), XrdCl::Stream::OnConnect(), XrdCl::AsyncSocketHandler::OnConnectionReturn(), XrdCl::Stream::OnError(), XrdCl::FileStateHandler::OnOpen(), XrdCl::Stream::OnReadTimeout(), XrdCl::XRootDMsgHandler::OnStatusReady(), XrdCl::HttpFilePlugIn::Open(), XrdCl::FileStateHandler::Open(), XrdCl::ZipArchive::OpenArchive(), parent(), XrdCl::ForkHandler::Parent(), XrdCl::FileStateHandler::PgRead(), XrdCl::FileStateHandler::PgReadImpl(), XrdCl::FileStateHandler::PgWriteImpl(), XrdCl::CopyProcess::Prepare(), prepare(), XrdCl::ForkHandler::Prepare(), XrdCl::XRootDMsgHandler::Process(), XrdCl::Utils::ProcessConfigDir(), XrdCl::PlugInManager::ProcessEnvironmentSettings(), XrdCl::Env::PutInt(), XrdCl::Env::PutString(), XrdCl::FileStateHandler::Read(), XrdCl::HttpFilePlugIn::Read(), XrdCl::FileStateHandler::ReadV(), XrdCl::PlugInManager::RegisterDefaultFactory(), XrdCl::PlugInManager::RegisterFactory(), XrdCl::TaskManager::RegisterTask(), XrdCl::InQueue::RemoveMessageHandler(), XrdCl::PollerBuiltIn::RemoveSocket(), XrdCl::HttpFileSystemPlugIn::Rm(), XrdCl::HttpFileSystemPlugIn::RmDir(), XrdCl::ClassicCopyJob::Run(), XrdCl::ThirdPartyCopyJob::Run(), XrdCl::TPFallBackCopyJob::Run(), XrdCl::TaskManager::RunTasks(), XrdCl::FileStateHandler::SetXAttr(), XrdCl::JobManager::Start(), XrdCl::PollerBuiltIn::Start(), XrdCl::TaskManager::Start(), XrdCl::HttpFilePlugIn::Stat(), XrdCl::HttpFileSystemPlugIn::Stat(), XrdCl::LocalFileHandler::Stat(), XrdCl::FileStateHandler::Stat(), XrdCl::JobManager::Stop(), XrdCl::PollerBuiltIn::Stop(), XrdCl::TaskManager::Stop(), XrdCl::HttpFilePlugIn::Sync(), XrdCl::FileStateHandler::Sync(), XrdCl::FileStateHandler::Truncate(), XrdCl::FileStateHandler::TryOtherServer(), XrdCl::TaskManager::UnregisterTask(), XrdCl::HttpFilePlugIn::VectorRead(), XrdCl::FileStateHandler::VectorRead(), XrdCl::FileStateHandler::VectorWrite(), XrdCl::FileStateHandler::Visa(), XrdCl::FileStateHandler::Write(), XrdCl::HttpFilePlugIn::Write(), XrdCl::XRootDMsgHandler::WriteMessageBody(), and XrdCl::FileStateHandler::WriteV().
void XrdCl::Log::Dump | ( | uint64_t | topic, |
const char * | format, | ||
... | |||
) |
Print a dump message.
Definition at line 299 of file XrdClLog.cc.
References DumpMsg, GetLevel(), likely, Say(), and unlikely.
Referenced by XrdCl::ZipArchive::AppendFile(), XrdCl::FileSystemData::AssignLastURL(), XrdCl::FileSystemData::AssignLoadBalancer(), XrdCl::ZipArchive::CloseArchive(), XrdCl::Stream::DisableIfEmpty(), XrdCl::PollerBuiltIn::EnableReadNotification(), XrdCl::PollerBuiltIn::EnableWriteNotification(), XrdCl::XRootDMsgHandler::Examine(), XrdCl::FSExecutor::Execute(), XrdCl::URL::FromString(), XrdCl::CheckSumManager::GetCalculator(), XrdCl::CheckSumHelper::GetCheckSum(), XrdCl::XRootDTransport::GetHeader(), XrdCl::Utils::GetLocalCheckSum(), XrdCl::Utils::GetRemoteCheckSum(), XrdCl::XRootDTransport::IsStreamBroken(), XrdCl::XRootDTransport::IsStreamTTLElapsed(), XrdCl::Utils::LogPropertyList(), main(), XrdCl::XRootDTransport::MessageReceived(), XrdCl::FileStateHandler::OnClose(), XrdCl::Stream::OnIncoming(), XrdCl::Stream::OnReadyToWrite(), XrdCl::FileStateHandler::OnStateError(), XrdCl::FileStateHandler::OnStateResponse(), XrdCl::XRootDMsgHandler::OnStatusReady(), XrdCl::XRootDMsgHandler::OnStreamEvent(), XrdCl::ZipArchive::OpenArchive(), XrdCl::ZipArchive::OpenFile(), XrdCl::XRootDMsgHandler::Process(), XrdCl::AsyncHSReader::Read(), XrdCl::AsyncMsgReader::Read(), XrdCl::AsyncVectorReader::Read(), XrdCl::MessageUtils::RedirectMessage(), XrdCl::TaskManager::RunTasks(), XrdCl::Socket::Send(), XrdCl::Stream::Send(), XrdCl::FileSystemData::Send(), XrdCl::MessageUtils::SendMessage(), XrdCl::FileStateHandler::TimeOutRequests(), and XrdCl::AsyncMsgWriter::Write().
void XrdCl::Log::Error | ( | uint64_t | topic, |
const char * | format, | ||
... | |||
) |
Report an error.
Definition at line 231 of file XrdClLog.cc.
References ErrorMsg, GetLevel(), Say(), and unlikely.
Referenced by XrdCl::FileSystem::FileSystem(), xrdcl_proxy::ProxyFactory::ProxyFactory(), XrdCl::FSExecutor::AddCommand(), XrdCl::PollerBuiltIn::AddSocket(), XrdCl::CheckSumManager::Calculate(), XrdCl::Stream::CanCollapse(), XrdCl::Utils::CheckTPC(), XrdCl::Utils::CheckTPCLite(), XrdCl::HttpFilePlugIn::Close(), XrdCl::LocalFileHandler::Close(), XrdCl::ZipArchive::CloseArchive(), XrdCl::PostMaster::CollapseRedirect(), XrdCl::Tls::Connect(), XrdCl::AsyncSocketHandler::Connect(), xrdcl_proxy::ProxyFactory::CreateFileSystem(), XrdCl::RecorderFactory::CreateFileSystem(), XrdCl::PollerFactory::CreatePoller(), XrdCl::HttpFileSystemPlugIn::DirList(), DoCache(), DoCat(), DoCD(), DoChMod(), DoLocate(), DoLS(), DoMkDir(), DoMv(), DoPrepare(), DoQuery(), DoRm(), DoRmDir(), DoSpaceInfo(), DoStat(), DoStatVFS(), DoTail(), DoTruncate(), DoXAttr(), XrdCl::Stream::EnableLink(), XrdCl::PollerBuiltIn::EnableReadNotification(), XrdCl::PollerBuiltIn::EnableWriteNotification(), XrdCl::FSExecutor::Execute(), XrdCl::URL::FromString(), XrdCl::CheckSumManager::GetCalculator(), XrdCl::Utils::GetHostAddresses(), XrdCl::Utils::GetLocalCheckSum(), XrdCl::DefaultEnv::GetMonitor(), XrdCl::XRootDTransport::GetMore(), XrdCl::AsyncSocketHandler::HandleHandShake(), XrdCl::XRootDTransport::HandShake(), XrdCl::Env::ImportInt(), IndexRemote(), XrdCl::CheckSumHelper::Initialize(), XrdCl::XCpCtx::Initialize(), XrdCl::InitTLS(), XrdCl::XRootDMsgHandler::InspectStatusRsp(), XrdCl::XRootDTransport::LogErrorResponse(), main(), XrdCl::XRootDTransport::MessageReceived(), XrdCl::HttpFileSystemPlugIn::MkDir(), XrdCl::HttpFileSystemPlugIn::Mv(), XrdCl::Stream::OnConnectError(), XrdCl::AsyncSocketHandler::OnConnectionReturn(), XrdCl::AsyncSocketHandler::OnFault(), XrdCl::AsyncSocketHandler::OnFaultWhileHandshaking(), XrdCl::FileStateHandler::OnStateError(), XrdCl::XRootDMsgHandler::OnStatusReady(), XrdCl::HttpFilePlugIn::Open(), XrdCl::File::Open(), XrdCl::FileStateHandler::Open(), XrdCl::ZipArchive::OpenArchive(), XrdCl::XRootDMsgHandler::Process(), ProcessStatQuery(), XrdCl::AsyncDiscardReader::Read(), XrdCl::AsyncRawReader::Read(), XrdCl::AsyncVectorReader::Read(), XrdCl::HttpFilePlugIn::Read(), XrdCl::LocalFileHandler::Read(), XrdCl::LocalFileHandler::ReadV(), XrdCl::MessageUtils::RedirectMessage(), XrdCl::PollerBuiltIn::RemoveSocket(), XrdCl::HttpFileSystemPlugIn::Rm(), XrdCl::HttpFileSystemPlugIn::RmDir(), XrdCl::ClassicCopyJob::Run(), XrdCl::MessageUtils::SendMessage(), XrdCl::JobManager::Start(), XrdCl::PollerBuiltIn::Start(), XrdCl::TaskManager::Start(), XrdCl::HttpFilePlugIn::Stat(), XrdCl::HttpFileSystemPlugIn::Stat(), XrdCl::LocalFileHandler::Stat(), XrdCl::JobManager::Stop(), XrdCl::PollerBuiltIn::Stop(), XrdCl::TaskManager::Stop(), XrdCl::LocalFileHandler::Sync(), XrdCl::LocalFileHandler::Truncate(), XrdCl::LocalFileHandler::VectorRead(), XrdCl::HttpFilePlugIn::VectorRead(), XrdCl::LocalFileHandler::VectorWrite(), XrdCl::AsyncHSWriter::Write(), XrdCl::AsyncMsgWriter::Write(), XrdCl::HttpFilePlugIn::Write(), XrdCl::LocalFileHandler::Write(), and XrdCl::LocalFileHandler::WriteV().
|
inline |
Get the log level.
Definition at line 258 of file XrdClLog.hh.
Referenced by Debug(), Dump(), Error(), XrdCl::URL::FromString(), XrdCl::XRootDTransport::GenerateDescription(), Info(), XrdCl::Utils::LogPropertyList(), main(), and Warning().
void XrdCl::Log::Info | ( | uint64_t | topic, |
const char * | format, | ||
... | |||
) |
Print an info.
Definition at line 265 of file XrdClLog.cc.
References GetLevel(), InfoMsg, likely, Say(), and unlikely.
Referenced by XrdCl::PostMaster::CollapseRedirect(), XrdCl::AsyncSocketHandler::DoTlsHandShake(), XrdCl::Env::ImportInt(), XrdCl::Env::ImportString(), IndexRemote(), XrdCl::Stream::OnConnectError(), XrdCl::FileStateHandler::PgWrite(), XrdCl::ClassicCopyJob::Run(), XrdCl::ThirdPartyCopyJob::Run(), and XrdCl::FileStateHandler::Write().
|
inline |
Register new topic.
Definition at line 248 of file XrdClLog.hh.
References SetTopicName().
void XrdCl::Log::Say | ( | LogLevel | level, |
uint64_t | topic, | ||
const char * | format, | ||
va_list | list | ||
) |
Always print the message
level | log level |
topic | topic of the message |
format | format string - the same as in printf |
list | list of arguments |
Definition at line 96 of file XrdClLog.cc.
References XrdOucTokenizer::GetLine(), and XrdCl::LogOut::Write().
Referenced by Debug(), Dump(), Error(), Info(), and Warning().
|
inline |
Set the level of the messages that should be sent to the destination.
Definition at line 205 of file XrdClLog.hh.
References SetLevel().
|
inline |
Set the level of the messages that should be sent to the destination.
Definition at line 193 of file XrdClLog.hh.
Referenced by main(), SetLevel(), and XrdCl::DefaultEnv::SetLogLevel().
|
inline |
Sets the mask for the topics of messages that should be printed.
Definition at line 232 of file XrdClLog.hh.
|
inline |
Sets the mask for the topics of messages that should be printed.
Definition at line 224 of file XrdClLog.hh.
Referenced by XrdCl::DefaultEnv::SetLogMask().
|
inline |
Set the output that should be used.
Definition at line 215 of file XrdClLog.hh.
Referenced by XrdCl::DefaultEnv::SetLogFile(), and XrdSsiLogger::SetMCB().
|
inline |
Set pid.
Definition at line 267 of file XrdClLog.hh.
Referenced by child(), and parent().
void XrdCl::Log::SetTopicName | ( | uint64_t | topic, |
std::string | name | ||
) |
Map a topic number to a string.
Definition at line 163 of file XrdClLog.cc.
Referenced by RegisterTopic(), and XrdCl::SetUpLogging().
void XrdCl::Log::Warning | ( | uint64_t | topic, |
const char * | format, | ||
... | |||
) |
Report a warning.
Definition at line 248 of file XrdClLog.cc.
References GetLevel(), Say(), unlikely, and WarningMsg.
Referenced by XrdCl::PollerBuiltIn::AddSocket(), XrdCl::PollerBuiltIn::EnableReadNotification(), XrdCl::PollerBuiltIn::EnableWriteNotification(), XrdCl::XRootDMsgHandler::Examine(), XrdCl::ActionExecutor::Execute(), XrdCl::Stream::OnIncoming(), XrdCl::Stream::OnMessageSent(), XrdCl::FileStateHandler::PgWrite(), XrdCl::XRootDMsgHandler::Process(), XrdCl::ClassicCopyJob::Run(), and XrdCl::Stream::Send().