29 #ifndef Pt_System_LogTarget_h
30 #define Pt_System_LogTarget_h
32 #include <Pt/System/Api.h>
33 #include <Pt/System/LogLevel.h>
34 #include <Pt/NonCopyable.h>
35 #include <Pt/Atomicity.h>
64 friend class LogManager;
75 const std::string& name()
const;
80 return atomicGet(_loglevel);
94 std::string channelUrl()
const;
103 void setChannel(
const std::string& url);
115 static LogTarget&
get(
const std::string& name);
123 bool inheritsLogLevel()
const;
126 void assignLogLevel(
int level,
bool inherited);
129 bool inheritsChannel()
const;
132 LogChannel* channel()
const
136 void removeChannel();
139 void assignChannel(LogChannel& ch);
149 mutable volatile atomic_t _loglevel;
152 bool _inheritLogLevel;
155 LogChannel* _channel;
158 bool _inheritChannel;
165 #endif // Pt_System_LogTarget_h
Log records can be added to a log.
Definition: LogRecord.h:90
Protects derived classes from being copied.
Definition: NonCopyable.h:54
LogLevel
Severity of the log-message.
Definition: LogLevel.h:41
Target of log-messages.
Definition: LogTarget.h:62
int logLevel() const
Returns the log level of the target.
Definition: LogTarget.h:78