XRootD
Loading...
Searching...
No Matches
XrdCl::DefaultEnv Class Reference

#include <XrdClDefaultEnv.hh>

Inheritance diagram for XrdCl::DefaultEnv:
Collaboration diagram for XrdCl::DefaultEnv:

Static Public Member Functions

static CheckSumManager * GetCheckSumManager ()
 Get checksum manager.
static Env * GetEnv ()
 Get default client environment.
static FileTimer * GetFileTimer ()
 Get file timer task.
static ForkHandler * GetForkHandler ()
 Get the fork handler.
static Log * GetLog ()
 Get default log.
static Monitor * GetMonitor ()
 Get the monitor object.
static PlugInFactory * GetPlugInFactory (const std::string url)
static PlugInManager * GetPlugInManager ()
 Get plug-in manager.
static PostMaster * GetPostMaster ()
 Get default post master.
static TransportManager * GetTransportManager ()
 Get transport manager.
static std::string GetVersion ()
 Get client version.
static void ReInitializeLogging ()
 Re-initialize the logging.
static bool SetLogFile (const std::string &filepath)
static void SetLogLevel (const std::string &level)
static void SetLogMask (const std::string &level, const std::string &mask)
 Set log mask.

Friends

struct ::EnvInitializer

Additional Inherited Members

Public Member Functions inherited from XrdCl::Env
virtual ~Env ()
 Destructor.
bool DelInt (const std::string &key)
bool DelString (const std::string &key)
bool GetDefaultIntValue (const std::string &key, int &value)
bool GetDefaultStringValue (const std::string &key, std::string &value)
bool GetInt (const std::string &key, int &value)
bool GetPtr (const std::string &key, void *&value)
bool GetString (const std::string &key, std::string &value)
bool ImportInt (const std::string &key, const std::string &shellKey)
bool ImportString (const std::string &key, const std::string &shellKey)
bool PutInt (const std::string &key, int value)
bool PutPtr (const std::string &key, void *value)
bool PutString (const std::string &key, const std::string &value)
void RecreateLock ()
void ReInitializeLock ()
void UnLock ()
void WriteLock ()

Detailed Description

Default environment for the client. Responsible for setting/importing defaults for the variables used by the client. And holding other global stuff.

Definition at line 45 of file XrdClDefaultEnv.hh.

Member Function Documentation

◆ GetCheckSumManager()

CheckSumManager * XrdCl::DefaultEnv::GetCheckSumManager ( )
static

Get checksum manager.

Definition at line 650 of file XrdClDefaultEnv.cc.

651 {
652 if( unlikely( !sCheckSumManager ) )
653 {
654 XrdSysMutexHelper scopedLock( sInitMutex );
655 if( !sCheckSumManager )
656 sCheckSumManager = new CheckSumManager();
657 }
658 return sCheckSumManager;
659 }
#define unlikely(x)

References XrdCl::CheckSumManager::CheckSumManager(), and unlikely.

Referenced by ::EnvInitializer, XrdCl::Utils::GetLocalCheckSum(), and XrdCl::CheckSumHelper::Initialize().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetEnv()

Env * XrdCl::DefaultEnv::GetEnv ( )
static

Get default client environment.

Definition at line 445 of file XrdClDefaultEnv.cc.

446 {
447 return sEnv;
448 }

Referenced by XrdCl::AsyncSocketHandler::AsyncSocketHandler(), XrdCl::Channel::Channel(), XrdClHttp::CurlWorker::CurlWorker(), XrdClS3::Factory::Factory(), XrdCl::PostMasterImpl::PostMasterImpl(), XrdCl::ZipListHandler::ZipListHandler(), ::EnvInitializer, XrdCl::CopyProcess::AddJob(), child(), XrdClHttp::ConfigureHandle(), XrdCl::AsyncSocketHandler::Connect(), DoLocate(), XrdClHttp::CurlOperation::FinishSetup(), XrdClHttp::GetBearerToken(), XrdClHttp::Factory::GetHeaderTimeoutWithDefault(), XrdClHttp::File::GetHeaderTimeoutWithDefault(), XrdCl::Utils::GetHostAddresses(), XrdCl::Utils::GetIntParameter(), GetMonitor(), XrdSsiClientProvider::GetService(), XrdCl::Utils::GetStringParameter(), XrdCl::Utils::InferChecksumType(), XrdCl::PostMaster::Initialize(), XrdCl::Socket::Initialize(), XrdCl::XRootDTransport::InitializeChannel(), XrdCl::InitTLS(), XrdClHttp::InjectBearerToken(), XrdCl::URL::IsMetalink(), XrdCl::XRootDTransport::IsStreamBroken(), XrdCl::XRootDTransport::IsStreamTTLElapsed(), main(), XrdCl::XRootDTransport::NeedEncryption(), parent(), XrdCl::FileStateHandler::PgWrite(), prepare(), XrdCl::XRootDMsgHandler::Process(), ProcessCommandLineEnv(), XrdCl::PlugInManager::ProcessEnvironmentSettings(), XrdCl::MessageUtils::ProcessSendParams(), XrdClHttp::CurlOperation::Redirect(), XrdCl::MessageUtils::RewriteCGIAndPath(), XrdCl::FileTimer::Run(), XrdCl::TickGeneratorTask::Run(), XrdClHttp::CurlWorker::Run(), XrdPosixConfig::SetEnv(), XrdPosixConfig::SetEnv(), XrdSsiClientProvider::SetTimeout(), XrdClHttp::CurlOperation::Setup(), XrdCl::XRootDTransport::SubStreamNumber(), and XrdClHttp::Filesystem::ThirdPartyCopy().

Here is the caller graph for this function:

◆ GetFileTimer()

FileTimer * XrdCl::DefaultEnv::GetFileTimer ( )
static

Get file timer task.

Definition at line 567 of file XrdClDefaultEnv.cc.

568 {
569 return sFileTimer;
570 }

Referenced by XrdCl::FileStateHandler::FileStateHandler(), XrdCl::FileStateHandler::FileStateHandler(), XrdCl::FileStateHandler::~FileStateHandler(), and ::EnvInitializer.

Here is the caller graph for this function:

◆ GetForkHandler()

ForkHandler * XrdCl::DefaultEnv::GetForkHandler ( )
static

Get the fork handler.

Definition at line 559 of file XrdClDefaultEnv.cc.

560 {
561 return sForkHandler;
562 }

Referenced by XrdCl::FileStateHandler::FileStateHandler(), XrdCl::FileStateHandler::FileStateHandler(), XrdCl::FileSystem::FileSystem(), XrdCl::FileStateHandler::~FileStateHandler(), XrdCl::FileSystem::~FileSystem(), ::EnvInitializer, child(), parent(), and prepare().

Here is the caller graph for this function:

◆ GetLog()

Log * XrdCl::DefaultEnv::GetLog ( )
static

Get default log.

Definition at line 501 of file XrdClDefaultEnv.cc.

502 {
503 return sLog;
504 }

Referenced by XrdCl::Channel::Channel(), XrdCl::ClassicCopyJob::ClassicCopyJob(), XrdClS3::Factory::Factory(), XrdCl::FileSystem::FileSystem(), xrdcl_proxy::ProxyFactory::ProxyFactory(), XrdCl::Stream::Stream(), XrdCl::ThirdPartyCopyJob::ThirdPartyCopyJob(), XrdCl::TPFallBackCopyJob::TPFallBackCopyJob(), XrdCl::XRootDMsgHandler::XRootDMsgHandler(), XrdCl::File::~File(), XrdCl::FileStateHandler::~FileStateHandler(), XrdCl::Stream::~Stream(), XrdCl::XRootDMsgHandler::~XRootDMsgHandler(), ::EnvInitializer, XrdCl::FSExecutor::AddCommand(), XrdCl::CopyProcess::AddJob(), XrdCl::PollerBuiltIn::AddSocket(), XrdCl::FileStateHandler::AfterForkChild(), XrdCl::ZipArchive::AppendFile(), XrdCl::FileSystemData::AssignLastURL(), XrdCl::FileSystemData::AssignLoadBalancer(), XrdCl::InQueue::AssignTimeout(), XrdClHttp::HeaderBuilder::Build(), BuildPath(), XrdCl::CheckSumManager::Calculate(), XrdCl::Stream::CanCollapse(), XrdCl::AsyncSocketHandler::CheckHSWait(), XrdCl::FileStateHandler::Checkpoint(), XrdCl::Utils::CheckTPC(), XrdCl::Utils::CheckTPCLite(), XrdCl::ForkHandler::Child(), child(), XrdCl::FileStateHandler::ChkptWrt(), XrdCl::FileStateHandler::ChkptWrtV(), XrdCl::FileStateHandler::Clone(), XrdCl::AsyncSocketHandler::Close(), XrdCl::FileStateHandler::Close(), XrdCl::LocalFileHandler::Close(), XrdCl::ZipArchive::CloseArchive(), XrdCl::PostMaster::CollapseRedirect(), XrdClHttp::ConfigureHandle(), XrdCl::AsyncSocketHandler::Connect(), XrdCl::Socket::Connect(), XrdCl::Tls::Connect(), XrdCl::RecorderFactory::CreateFileSystem(), xrdcl_proxy::ProxyFactory::CreateFileSystem(), XrdCl::PollerFactory::CreatePoller(), XrdCl::Env::DelInt(), XrdCl::Env::DelString(), XrdCl::FileStateHandler::DelXAttr(), XrdCl::Stream::DisableIfEmpty(), XrdCl::XRootDTransport::Disconnect(), DoCache(), DoCat(), DoCD(), DoChMod(), DoLocate(), DoLS(), DoMkDir(), DoMv(), DoPrepare(), DoQuery(), DoRm(), DoRmDir(), DoSpaceInfo(), DoStat(), DoStatVFS(), DoTail(), XrdCl::AsyncSocketHandler::DoTlsHandShake(), DoTruncate(), DoXAttr(), XrdCl::Stream::EnableLink(), XrdCl::PollerBuiltIn::EnableReadNotification(), XrdCl::PollerBuiltIn::EnableWriteNotification(), XrdCl::XRootDMsgHandler::Examine(), XrdCl::ActionExecutor::Execute(), XrdCl::FSExecutor::Execute(), XrdCl::FileStateHandler::Fcntl(), XrdCl::Stream::ForceError(), XrdCl::URL::FromString(), XrdCl::XRootDTransport::GenerateDescription(), XrdCl::CheckSumManager::GetCalculator(), XrdCl::PostMasterImpl::GetChannel(), XrdCl::CheckSumHelper::GetCheckSum(), XrdCl::InQueue::GetHandlerForMessage(), XrdCl::XRootDTransport::GetHeader(), XrdCl::Utils::GetHostAddresses(), XrdCl::Env::GetInt(), XrdCl::Utils::GetLocalCheckSum(), GetMonitor(), XrdCl::XRootDTransport::GetMore(), XrdCl::Env::GetPtr(), XrdCl::Utils::GetRemoteCheckSum(), XrdCl::Env::GetString(), XrdCl::FileStateHandler::GetXAttr(), XrdCl::AsyncSocketHandler::HandleHandShake(), XrdCl::XRootDTransport::HandShake(), XrdCl::XRootDTransport::HandShakeDone(), XrdCl::Env::ImportInt(), XrdCl::Env::ImportString(), IndexRemote(), XrdCl::CheckSumHelper::Initialize(), XrdCl::XCpCtx::Initialize(), XrdCl::InitTLS(), XrdCl::XRootDMsgHandler::InspectStatusRsp(), XrdCl::XRootDTransport::IsStreamBroken(), XrdCl::XRootDTransport::IsStreamTTLElapsed(), XrdCl::FileStateHandler::ListXAttr(), XrdCl::XRootDTransport::LogErrorResponse(), main(), XrdCl::XRootDTransport::MessageReceived(), XrdCl::XRootDTransport::MultiplexSubStream(), XrdCl::XRootDTransport::NbConnectedStrm(), XrdCl::FileStateHandler::OnClose(), XrdCl::Stream::OnConnect(), XrdCl::Stream::OnConnectError(), XrdCl::AsyncSocketHandler::OnConnectionReturn(), XrdCl::Stream::OnError(), XrdCl::AsyncSocketHandler::OnFault(), XrdCl::AsyncSocketHandler::OnFaultWhileHandshaking(), XrdCl::Stream::OnIncoming(), XrdCl::FileStateHandler::OnOpen(), XrdCl::Stream::OnReadTimeout(), XrdCl::Stream::OnReadyToWrite(), XrdCl::FileStateHandler::OnStateError(), XrdCl::FileStateHandler::OnStateResponse(), XrdCl::XRootDMsgHandler::OnStatusReady(), XrdCl::XRootDMsgHandler::OnStreamEvent(), XrdCl::ZipArchive::OpenArchive(), XrdCl::ZipArchive::OpenFile(), XrdCl::ForkHandler::Parent(), parent(), XrdClHttp::ParseTokenFile(), XrdCl::FileStateHandler::PgRead(), XrdCl::FileStateHandler::PgReadImpl(), XrdCl::FileStateHandler::PgWrite(), XrdCl::FileStateHandler::PgWriteImpl(), XrdCl::AsyncSocketHandler::PreClose(), XrdCl::CopyProcess::Prepare(), XrdCl::ForkHandler::Prepare(), prepare(), XrdCl::FileStateHandler::PreRead(), XrdCl::XRootDMsgHandler::Process(), XrdCl::Utils::ProcessConfigDir(), XrdCl::PlugInManager::ProcessEnvironmentSettings(), ProcessStatQuery(), XrdCl::Env::PutInt(), XrdCl::Env::PutString(), XrdCl::AsyncDiscardReader::Read(), XrdCl::AsyncHSReader::Read(), XrdCl::AsyncMsgReader::Read(), XrdCl::AsyncRawReader::Read(), XrdCl::AsyncVectorReader::Read(), XrdCl::FileStateHandler::Read(), XrdCl::LocalFileHandler::Read(), XrdCl::ZipArchive::ReadFromImpl, XrdCl::FileStateHandler::ReadV(), XrdCl::LocalFileHandler::ReadV(), XrdCl::MessageUtils::RedirectMessage(), XrdCl::PlugInManager::RegisterDefaultFactory(), XrdCl::PlugInManager::RegisterFactory(), XrdCl::TaskManager::RegisterTask(), XrdCl::InQueue::RemoveMessageHandler(), XrdCl::PollerBuiltIn::RemoveSocket(), XrdCl::ClassicCopyJob::Run(), XrdCl::ThirdPartyCopyJob::Run(), XrdCl::TPFallBackCopyJob::Run(), XrdCl::TaskManager::RunTasks(), XrdCl::FileSystemData::Send(), XrdCl::Socket::Send(), XrdCl::Stream::Send(), XrdCl::MessageUtils::SendMessage(), SetLogFile(), SetLogLevel(), SetLogMask(), XrdSsiLogger::SetMCB(), XrdCl::FileStateHandler::SetXAttr(), XrdCl::JobManager::Start(), XrdCl::PollerBuiltIn::Start(), XrdCl::TaskManager::Start(), XrdCl::FileStateHandler::Stat(), XrdCl::LocalFileHandler::Stat(), XrdCl::JobManager::Stop(), XrdCl::PollerBuiltIn::Stop(), XrdCl::TaskManager::Stop(), XrdCl::XRootDTransport::SubStreamNumber(), XrdCl::FileStateHandler::Sync(), XrdCl::LocalFileHandler::Sync(), XrdClHttp::Filesystem::ThirdPartyCopy(), XrdCl::FileStateHandler::TimeOutRequests(), XrdCl::FileStateHandler::Truncate(), XrdCl::LocalFileHandler::Truncate(), XrdCl::FileStateHandler::TryOtherServer(), XrdCl::TaskManager::UnregisterTask(), XrdCl::FileStateHandler::VectorRead(), XrdCl::LocalFileHandler::VectorRead(), XrdEc::Reader::VectorRead(), XrdCl::FileStateHandler::VectorWrite(), XrdCl::LocalFileHandler::VectorWrite(), XrdCl::FileStateHandler::Visa(), XrdCl::AsyncHSWriter::Write(), XrdCl::AsyncMsgWriter::Write(), XrdCl::FileStateHandler::Write(), XrdCl::FileStateHandler::Write(), XrdCl::LocalFileHandler::Write(), XrdCl::XRootDMsgHandler::WriteMessageBody(), XrdCl::FileStateHandler::WriteV(), and XrdCl::LocalFileHandler::WriteV().

◆ GetMonitor()

Monitor * XrdCl::DefaultEnv::GetMonitor ( )
static

Get the monitor object.

Definition at line 575 of file XrdClDefaultEnv.cc.

576 {
577 if( unlikely( !sMonitorInitialized ) )
578 {
579 XrdSysMutexHelper scopedLock( sInitMutex );
580 if( !sMonitorInitialized )
581 {
582 //----------------------------------------------------------------------
583 // Check the environment settings
584 //----------------------------------------------------------------------
585 Env *env = GetEnv();
586 Log *log = GetLog();
587 sMonitorInitialized = true;
588 std::string monitorLib = DefaultClientMonitor;
589 env->GetString( "ClientMonitor", monitorLib );
590 if( monitorLib.empty() )
591 {
592 log->Debug( UtilityMsg, "Monitor library name not set. No "
593 "monitoring" );
594 return 0;
595 }
596
597 std::string monitorParam = DefaultClientMonitorParam;
598 env->GetString( "ClientMonitorParam", monitorParam );
599
600 log->Debug( UtilityMsg, "Initializing monitoring, lib: %s, param: %s",
601 monitorLib.c_str(), monitorParam.c_str() );
602
603 //----------------------------------------------------------------------
604 // Loading the plugin
605 //----------------------------------------------------------------------
606 char *errBuffer = new char[4000];
607 sMonitorLibHandle = new XrdOucPinLoader(
608 errBuffer, 4000, &XrdVERSIONINFOVAR( XrdCl ),
609 "monitor", monitorLib.c_str() );
610
611 typedef XrdCl::Monitor *(*MonLoader)(const char *, const char *);
612 MonLoader loader;
613 loader = (MonLoader)sMonitorLibHandle->Resolve( "XrdClGetMonitor", -1 );
614 if( !loader )
615 {
616 log->Error( UtilityMsg, "Unable to initialize user monitoring: %s",
617 errBuffer );
618 delete [] errBuffer;
619 sMonitorLibHandle->Unload();
620 delete sMonitorLibHandle; sMonitorLibHandle = 0;
621 return 0;
622 }
623
624 //----------------------------------------------------------------------
625 // Instantiating the monitor object
626 //----------------------------------------------------------------------
627 const char *param = monitorParam.empty() ? 0 : monitorParam.c_str();
628 sMonitor = (*loader)( XrdSysUtils::ExecName(), param );
629
630 if( !sMonitor )
631 {
632 log->Error( UtilityMsg, "Unable to initialize user monitoring: %s",
633 errBuffer );
634 delete [] errBuffer;
635 sMonitorLibHandle->Unload();
636 delete sMonitorLibHandle; sMonitorLibHandle = 0;
637 return 0;
638 }
639 log->Debug( UtilityMsg, "Successfully initialized monitoring from: %s",
640 monitorLib.c_str() );
641 delete [] errBuffer;
642 }
643 }
644 return sMonitor;
645 }
static Log * GetLog()
Get default log.
static Env * GetEnv()
Get default client environment.
XrdOucPinLoader(XrdSysError *errP, XrdVersionInfo *vInfo, const char *drctv, const char *plib)
static const char * ExecName()
const char *const DefaultClientMonitorParam
const uint64_t UtilityMsg
const char *const DefaultClientMonitor
XrdSysError Log
Definition XrdConfig.cc:113

References XrdOucPinLoader::XrdOucPinLoader(), XrdCl::Log::Debug(), XrdCl::DefaultClientMonitor, XrdCl::DefaultClientMonitorParam, XrdCl::Log::Error(), XrdSysUtils::ExecName(), GetEnv(), GetLog(), XrdCl::Env::GetString(), unlikely, and XrdCl::UtilityMsg.

Referenced by ::EnvInitializer, XrdCl::Stream::OnConnect(), XrdCl::FileStateHandler::OnOpen(), XrdCl::FileStateHandler::OnStateError(), XrdCl::ClassicCopyJob::Run(), and XrdCl::ThirdPartyCopyJob::Run().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetPlugInFactory()

PlugInFactory * XrdCl::DefaultEnv::GetPlugInFactory ( const std::string url)
static

Retrieve the plug-in factory for the given URL

Returns
you do not own the returned memory

Definition at line 686 of file XrdClDefaultEnv.cc.

687 {
688 return sPlugInManager->GetFactory( url );
689 }

Referenced by ::EnvInitializer.

Here is the caller graph for this function:

◆ GetPlugInManager()

PlugInManager * XrdCl::DefaultEnv::GetPlugInManager ( )
static

Get plug-in manager.

Definition at line 678 of file XrdClDefaultEnv.cc.

679 {
680 return sPlugInManager;
681 }

Referenced by XrdCl::FileSystem::FileSystem(), ::EnvInitializer, and XrdCl::ThirdPartyCopy().

Here is the caller graph for this function:

◆ GetPostMaster()

PostMaster * XrdCl::DefaultEnv::GetPostMaster ( )
static

Get default post master.

Definition at line 461 of file XrdClDefaultEnv.cc.

462 {
463 PostMaster* postMaster = AtomicGet(sPostMaster);
464
465 if( unlikely( !postMaster ) )
466 {
467 XrdSysMutexHelper scopedLock( sInitMutex );
468 postMaster = AtomicGet(sPostMaster);
469
470 if( postMaster )
471 return postMaster;
472
473 postMaster = new PostMaster();
474
475 if( !postMaster->Initialize() )
476 {
477 delete postMaster;
478 postMaster = 0;
479 return 0;
480 }
481
482 if( !postMaster->Start() )
483 {
484 postMaster->Finalize();
485 delete postMaster;
486 postMaster = 0;
487 return 0;
488 }
489
490 sForkHandler->RegisterPostMaster( postMaster );
491 postMaster->GetTaskManager()->RegisterTask( sFileTimer, time(0), false );
492 AtomicCAS(sPostMaster, sPostMaster, postMaster);
493 }
494
495 return postMaster;
496 }
#define AtomicCAS(x, y, z)
#define AtomicGet(x)
PostMaster()
Constructor.

References XrdCl::PostMaster::PostMaster(), AtomicCAS, AtomicGet, XrdCl::PostMaster::Finalize(), XrdCl::PostMaster::GetTaskManager(), XrdCl::PostMaster::Initialize(), XrdCl::TaskManager::RegisterTask(), XrdCl::PostMaster::Start(), and unlikely.

Referenced by XrdCl::XRootDMsgHandler::XRootDMsgHandler(), XrdCl::File::~File(), XrdCl::FileStateHandler::~FileStateHandler(), ::EnvInitializer, XrdCl::FileStateHandler::Close(), XrdPosixConfig::conTracker(), XrdCl::FileSystem::DirList(), XrdCl::Utils::GetProtocolVersion(), main(), XrdCl::Stream::OnConnect(), XrdCl::Stream::OnConnectError(), XrdCl::FileStateHandler::OnOpen(), XrdCl::Stream::OnReadTimeout(), XrdCl::FileStateHandler::PgRead(), XrdCl::LocalFileHandler::QueueTask(), XrdCl::MessageUtils::RedirectMessage(), XrdCl::Operation< HasHndl >::Run(), XrdEc::ScheduleHandler(), XrdEc::ScheduleHandler(), XrdCl::MessageUtils::SendMessage(), and XrdCl::FileStateHandler::TimeOutRequests().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetTransportManager()

TransportManager * XrdCl::DefaultEnv::GetTransportManager ( )
static

Get transport manager.

Definition at line 664 of file XrdClDefaultEnv.cc.

665 {
666 if( unlikely( !sTransportManager ) )
667 {
668 XrdSysMutexHelper scopedLock( sInitMutex );
669 if( !sTransportManager )
670 sTransportManager = new TransportManager();
671 }
672 return sTransportManager;
673 }

References XrdCl::TransportManager::TransportManager(), and unlikely.

Referenced by ::EnvInitializer, XrdCl::PostMaster::CollapseRedirect(), XrdCl::PostMasterImpl::GetChannel(), and XrdCl::PluginUnloadHandler::UnloadHandler().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetVersion()

std::string XrdCl::DefaultEnv::GetVersion ( )
static

Get client version.

Definition at line 453 of file XrdClDefaultEnv.cc.

454 {
455 return XrdVERSION;
456 }

Referenced by ::EnvInitializer.

Here is the caller graph for this function:

◆ ReInitializeLogging()

void XrdCl::DefaultEnv::ReInitializeLogging ( )
static

Re-initialize the logging.

Definition at line 785 of file XrdClDefaultEnv.cc.

786 {
787 delete sLog;
788 sLog = new Log();
789 SetUpLog();
790 }
Log()
Constructor.
Definition XrdClLog.hh:119

References XrdCl::Log::Log().

Referenced by ::EnvInitializer, and child().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetLogFile()

bool XrdCl::DefaultEnv::SetLogFile ( const std::string & filepath)
static

Set log file

Parameters
filepathpath to the log file

Definition at line 518 of file XrdClDefaultEnv.cc.

519 {
520 Log *log = GetLog();
521 LogOutFile *out = new LogOutFile();
522
523 if( out->Open( filepath ) )
524 {
525 log->SetOutput( out );
526 return true;
527 }
528
529 delete out;
530 return false;
531 }

References XrdCl::LogOutFile::LogOutFile(), GetLog(), XrdCl::LogOutFile::Open(), and XrdCl::Log::SetOutput().

Referenced by ::EnvInitializer.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetLogLevel()

void XrdCl::DefaultEnv::SetLogLevel ( const std::string & level)
static

Set log level

Parameters
levelDump, Debug, Info, Warning or Error

Definition at line 509 of file XrdClDefaultEnv.cc.

510 {
511 Log *log = GetLog();
512 log->SetLevel( level );
513 }

References GetLog(), and XrdCl::Log::SetLevel().

Referenced by ::EnvInitializer.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetLogMask()

void XrdCl::DefaultEnv::SetLogMask ( const std::string & level,
const std::string & mask )
static

Set log mask.

Set log mask. Determines which diagnostics topics should be printed. It's a "|" separated list of topics. The first element may be "All" in which case all the topics are enabled and the subsequent elements may turn them off, or "None" in which case all the topics are disabled and the subsequent flags may turn them on. If the topic name is prefixed with "^", then it means that the topic should be disabled. If the topic name is not prefixed, then it means that the topic should be enabled.

The default for each level is "All", except for the "Dump" level, where the default is "All|^PollerMsg". This means that, at the "Dump" level, all the topics but "PollerMsg" are enabled.

Available topics: AppMsg, UtilityMsg, FileMsg, PollerMsg, PostMasterMsg, XRootDTransportMsg, TaskMgrMsg, XRootDMsg, FileSystemMsg, AsyncSockMsg

Parameters
levellog level or "All" for all levels
masklog mask

Definition at line 536 of file XrdClDefaultEnv.cc.

538 {
539 Log *log = GetLog();
540 MaskTranslator translator;
541 uint64_t topicMask = translator.translateMask( mask );
542
543 if( level == "All" )
544 {
545 log->SetMask( Log::ErrorMsg, topicMask );
546 log->SetMask( Log::WarningMsg, topicMask );
547 log->SetMask( Log::InfoMsg, topicMask );
548 log->SetMask( Log::DebugMsg, topicMask );
549 log->SetMask( Log::DumpMsg, topicMask );
550 return;
551 }
552
553 log->SetMask( level, topicMask );
554 }
@ InfoMsg
print info
Definition XrdClLog.hh:111
@ WarningMsg
report warnings
Definition XrdClLog.hh:110
@ DebugMsg
print debug info
Definition XrdClLog.hh:112
@ ErrorMsg
report errors
Definition XrdClLog.hh:109
@ DumpMsg
print details of the request and responses
Definition XrdClLog.hh:113

References XrdCl::Log::DebugMsg, XrdCl::Log::DumpMsg, XrdCl::Log::ErrorMsg, GetLog(), XrdCl::Log::InfoMsg, XrdCl::Log::SetMask(), and XrdCl::Log::WarningMsg.

Referenced by ::EnvInitializer.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ::EnvInitializer


The documentation for this class was generated from the following files: