32#define DECL_LOG_MODULE(name) static constexpr char Tag[] = #name;
114 static void set(
Logger *logger);
118 static Logger *getInstance();
126 void setVerboseMode(VerboseMode sev);
130 VerboseMode getVerboseMode()
const;
150 void print(
const String &message, PrintMode mode = PrintMode::WithoutDateTime);
178 String getDateTime()
const;
185 StdLogStream() =
default;
188 ~StdLogStream()
override =
default;
192 void write(
const String &msg)
override;
195 static Logger *sLogger;
198 LogStreamArray mLogStreams;
199 VerboseMode mVerboseMode{VerboseMode::Normal};
200 uint32_t mIntention{0};
219#define log_trace(domain, msg) ::cppcore::tracePrint(domain, __FILE__, __LINE__, msg)
227#define log_debug(domain, msg) ::cppcore::debugPrint(domain, __FILE__, __LINE__, msg)
235#define log_info(domain, msg) ::cppcore::infoPrint(domain, __FILE__, __LINE__, msg)
243#define log_warn(domain, message) ::cppcore::warnPrint(domain, __FILE__, __LINE__, message)
251#define log_error(domain, message) ::cppcore::errorPrint(domain, __FILE__, __LINE__, message)
259#define log_fatal(domain, message) ::cppcore::fatalPrint(domain, __FILE__, __LINE__, message)
#define DLL_CPPCORE_EXPORT
This pure abstract interface class declares the protocol for log-stream implementation.
AbstractLogStream(const AbstractLogStream &)=delete
virtual void deactivate()
The stream will be deactivated.
virtual bool isActive() const
Returns true, if the stream is active.
AbstractLogStream()=default
The default class constructor.
virtual void write(const String &message)=0
Will write a message into the attached log stream.
virtual void activate()
The stream will be activated.
virtual ~AbstractLogStream()=default
The default class destructor, virtual.
This class implements a simple logger.
VerboseMode
Describes the verbose mode.
PrintMode
Describes the mode for prints into the active log stream.
This template class implements a simple array with dynamic boundaries.
This class is used to describe the inner data of a string.
TStringBase< char > String
void tracePrint(const String &domain, const String &file, int line, const String &msg)
void errorPrint(const String &domain, const String &file, int line, const String &msg)
void warnPrint(const String &domain, const String &file, int line, const String &msg)
void debugPrint(const String &domain, const String &file, int line, const String &msg)
void fatalPrint(const String &domain, const String &file, int line, const String &msg)
void infoPrint(const String &domain, const String &file, int line, const String &msg)