class logger
Declaration
class logger { /* full declaration omitted */ };Description
The logger class. Every log from your application is an instance of this (see @ref"workflow")
As described in @ref"workflow", processing the message is composed of 2 things: - @ref"Gathering the message" - @ref"Processing the message" The logger class has 2 template parameters: \n\nYou will seldom need to use the logger class directly. You can use @ref"other wrapper classes". \n\nOnce all message is gathered, it's passed on to the writer. This is usually done through a @ref"macro". \n\nTo understand more on the workflow that involves %logging: - check out the gather namespace - check out the writer namespace
Declared at: libs/pika/logging/include/pika/logging/detail/logger.hpp:80
Method Overview
- public pika::util::logging::logger::gather_holder gather()
- public bool is_enabled(pika::util::logging::level level) const noexcept
- public logger() noexcept
- public logger(pika::util::logging::level default_level) noexcept
- public void mark_as_initialized()
- public void set_enabled(pika::util::logging::level level) noexcept
- public void turn_cache_off()
- public void write(pika::util::logging::message msg)
- public writer::named_write & writer() noexcept
- public const writer::named_write & writer() const noexcept
- public ~logger()
Methods
pika::util::logging::logger::gather_holder
gather()
pika::util::logging::logger::gather_holder
gather()Description
reads all data about a log message (gathers all the data about it)
Declared at: libs/pika/logging/include/pika/logging/detail/logger.hpp:123
bool is_enabled(pika::util::logging::level level)
const noexcept
bool is_enabled(pika::util::logging::level level)
const noexceptDeclared at: libs/pika/logging/include/pika/logging/detail/logger.hpp:137
Parameters
- pika::util::logging::level level
logger() noexcept
logger() noexceptDeclared at: libs/pika/logging/include/pika/logging/detail/logger.hpp:104
logger(pika::util::logging::level
default_level) noexcept
logger(pika::util::logging::level
default_level) noexceptDeclared at: libs/pika/logging/include/pika/logging/detail/logger.hpp:108
Parameters
- pika::util::logging::level default_level
void mark_as_initialized()
void mark_as_initialized()Description
Marks this logger as initialized
You might log messages before the logger is initialized. In this case, they are cached, and will be written to the logger only when you mark it as "initialized" Example:
Declared at: libs/pika/logging/include/pika/logging/detail/logger.hpp:163
void set_enabled(
pika::util::logging::level level) noexcept
void set_enabled(
pika::util::logging::level level) noexceptDeclared at: libs/pika/logging/include/pika/logging/detail/logger.hpp:142
Parameters
- pika::util::logging::level level
void turn_cache_off()
void turn_cache_off()Declared at: libs/pika/logging/include/pika/logging/detail/logger.hpp:169
void write(pika::util::logging::message msg)
void write(pika::util::logging::message msg)Declared at: libs/pika/logging/include/pika/logging/detail/logger.hpp:172
Parameters
writer::named_write& writer() noexcept
writer::named_write& writer() noexceptDeclared at: libs/pika/logging/include/pika/logging/detail/logger.hpp:128
const writer::named_write& writer() const noexcept
const writer::named_write& writer() const noexceptDeclared at: libs/pika/logging/include/pika/logging/detail/logger.hpp:132
~logger()
~logger()Declared at: libs/pika/logging/include/pika/logging/detail/logger.hpp:113