struct named_destinations
Declaration
struct named_destinations { /* full declaration omitted */ };Description
Allows you to contain multiple destinations, give each such destination a name. Then, at run-time, you can specify a format string which will specify which destinations to be called, and on what order.
This allows you: - to hold multiple destinations - each destination is given a name, when being added. The name must not contain spaces and must not start with '+'/'-' signs - you have a %format string, which contains what destinations to be called, and on which order The %format string contains destination names, separated by space. When a message is written to this destination, I parse the format string. When a name is encountered, if there's a destination corresponding to this name, I will call it. Example: In the above code, we'll write to 3 destinations, in the following order: - first, to the console - second, to the out.txt file - third, to the debug window As an extra feature: - if a name starts with '-' is ignored - if a name starts with '+', is included. This is useful if you want to set this format string in a config file. The good thing is that this way you can easily turn on/off certain destinations, while seeing all the available destinations as well. Example: \n+out_file -debug_window +console\nIn the above example, I know that the available destinations are @c@cand @cbut I'm not writing to @c
Declared at: libs/pika/logging/include/pika/logging/format/named_write.hpp:221
Method Overview
- public void add(const std::string & name, pika::util::logging::detail::named_destinations::ptr_type p)
- public void configure(const std::string & name, const std::string & configure_str)
- public named_destinations()
- public pika::util::logging::detail::named_destinations & string(const std::string & str)
Methods
void add(const std::string& name,
pika::util::logging::detail::
named_destinations::ptr_type p)
void add(const std::string& name,
pika::util::logging::detail::
named_destinations::ptr_type p)Declared at: libs/pika/logging/include/pika/logging/format/named_write.hpp:236
Parameters
- const std::string& name
- pika::util::logging::detail::named_destinations:: ptr_type p
void configure(const std::string& name,
const std::string& configure_str)
void configure(const std::string& name,
const std::string& configure_str)Declared at: libs/pika/logging/include/pika/logging/format/named_write.hpp:247
Parameters
- const std::string& name
- const std::string& configure_str
named_destinations()
named_destinations()Declared at: libs/pika/logging/include/pika/logging/format/named_write.hpp:227
pika::util::logging::detail::named_destinations&
string(const std::string& str)
pika::util::logging::detail::named_destinations&
string(const std::string& str)Declared at: libs/pika/logging/include/pika/logging/format/named_write.hpp:229
Parameters
- const std::string& str