25 #ifndef __XRD_CL_LOG_HH__
26 #define __XRD_CL_LOG_HH__
58 virtual void Write(
const std::string &message ) = 0;
73 bool Open(
const std::string &fileName );
79 virtual void Write(
const std::string &message );
91 virtual void Write(
const std::string &message );
123 for(
int i = 0; i < maxMask; ++i )
124 pMask[i] = 0xffffffffffffffffULL;
138 void Error( uint64_t topic,
const char *format, ... );
143 void Warning( uint64_t topic,
const char *format, ... );
148 void Info( uint64_t topic,
const char *format, ... );
153 void Debug( uint64_t topic,
const char *format, ... );
158 void Dump( uint64_t topic,
const char *format, ... );
168 void Say(
LogLevel level, uint64_t topic,
const char *format, va_list list );
175 #if __cplusplus >= 201103L
176 pLevel.store(level, std::memory_order_relaxed);
212 void SetMask(
const std::string &level, uint64_t mask )
230 uint64_t tpcnb =
pTopicMap.rbegin()->first << 1;
268 #endif // __XRD_CL_LOG_HH__
virtual void Write(const std::string &message)
std::map< uint64_t, std::string > TopicMap
Definition: XrdClLog.hh:253
void SetMask(const std::string &level, uint64_t mask)
Sets the mask for the topics of messages that should be printed.
Definition: XrdClLog.hh:212
~Log()
Definition: XrdClLog.hh:130
virtual void Write(const std::string &message)
void Say(LogLevel level, uint64_t topic, const char *format, va_list list)
print info
Definition: XrdClLog.hh:111
LogLevel GetLevel() const
Get the log level.
Definition: XrdClLog.hh:238
report errors
Definition: XrdClLog.hh:109
bool Open(const std::string &fileName)
Open the log file.
void Warning(uint64_t topic, const char *format,...)
Report a warning.
void Info(uint64_t topic, const char *format,...)
Print an info.
int pFileDes
Definition: XrdClLog.hh:82
void SetTopicName(uint64_t topic, std::string name)
Map a topic number to a string.
TopicMap pTopicMap
Definition: XrdClLog.hh:262
void SetPid(pid_t pid)
Set pid.
Definition: XrdClLog.hh:247
virtual ~LogOutCerr()
Definition: XrdClLog.hh:92
Write log messages to stderr.
Definition: XrdClLog.hh:88
Write log messages to a file.
Definition: XrdClLog.hh:64
report warnings
Definition: XrdClLog.hh:110
void Dump(uint64_t topic, const char *format,...)
Print a dump message.
report nothing
Definition: XrdClLog.hh:108
std::string LogLevelToString(LogLevel level)
Definition: XrdSysPthread.hh:164
void SetLevel(const std::string &level)
Set the level of the messages that should be sent to the destination.
Definition: XrdClLog.hh:185
LogLevel
Log levels.
Definition: XrdClLog.hh:106
print debug info
Definition: XrdClLog.hh:112
pid_t pPid
Definition: XrdClLog.hh:264
XrdSysMutex pMutex
Definition: XrdClLog.hh:94
void Close()
Close the log file.
bool StringToLogLevel(const std::string &strLevel, LogLevel &level)
virtual ~LogOutFile()
Definition: XrdClLog.hh:68
virtual void Write(const std::string &message)=0
void SetMask(LogLevel level, uint64_t mask)
Sets the mask for the topics of messages that should be printed.
Definition: XrdClLog.hh:204
LogOut * pOutput
Definition: XrdClLog.hh:261
void Error(uint64_t topic, const char *format,...)
Report an error.
std::string TopicToString(uint64_t topic)
print details of the request and responses
Definition: XrdClLog.hh:113
std::atomic< LogLevel > pLevel
Definition: XrdClLog.hh:258
void SetLevel(LogLevel level)
Set the level of the messages that should be sent to the destination.
Definition: XrdClLog.hh:173
LogOutFile()
Definition: XrdClLog.hh:67
uint64_t RegisterTopic(const std::string &topic)
Register new topic.
Definition: XrdClLog.hh:228
virtual ~LogOut()
Definition: XrdClLog.hh:51
void SetOutput(LogOut *output)
Set the output that should be used.
Definition: XrdClLog.hh:195
void Debug(uint64_t topic, const char *format,...)
Print a debug message.
uint64_t pMask[DumpMsg+1]
Definition: XrdClLog.hh:260
uint32_t pTopicMaxLength
Definition: XrdClLog.hh:263
Interface for logger outputs.
Definition: XrdClLog.hh:48
Log()
Constructor.
Definition: XrdClLog.hh:119
Handle diagnostics.
Definition: XrdClLog.hh:100