66 explicit
Log(std::
string appname,
Level level =
Level::INFORMATIONAL) noexcept;
74 Log(
Log const& other) noexcept;
76 Log& operator=(
Log const& other) noexcept;
89 static
void setStream(std::ostream* os) noexcept;
101 static
void setOutfile(std::
string const& filename);
141 void setAppname(std::
string appname) noexcept;
153 void write(std::
string const& msg);
160 void write(std::
string const& msg,
Level logLevel);
166 void operator()(std::
string const& msg);
173 void operator()(std::
string const& msg,
Level logLevel);
177#define NLOG(Logger, Message) \
179 std::ostringstream msgs; \
181 (Logger).write(msgs.str()); \
183#define NLOG_ERROR(Logger, Message) \
185 std::ostringstream msgs; \
187 (Logger).write(msgs.str(), nawa::Log::Level::ERROR); \
189#define NLOG_WARNING(Logger, Message) \
191 std::ostringstream msgs; \
193 (Logger).write(msgs.str(), nawa::Log::Level::WARNING); \
195#define NLOG_INFO(Logger, Message) \
197 std::ostringstream msgs; \
199 (Logger).write(msgs.str(), nawa::Log::Level::INFORMATIONAL); \
201#define NLOG_DEBUG(Logger, Message) \
203 std::ostringstream msgs; \
205 (Logger).write(msgs.str(), nawa::Log::Level::DEBUG); \
static void setOutputLevel(Level level)
static void setOutfile(std::string const &filename)
void setDefaultLogLevel(Level level) noexcept
static void lockStream() noexcept
void write(std::string const &msg)
void setAppname(std::string appname) noexcept
static bool isLocked() noexcept
static void setStream(std::ostream *os) noexcept
static void setExtendedFormat(bool useExtendedFormat)
Macros for frequently used patterns.
#define NAWA_PRIVATE_DATA()