Freundlich's C++ toolkit
The logger context class is used for finding loggers at runtime.
An object of this class should be declared as static inside a function. This ensures that it is available before every global logger gets constructed. The context object can be passed using fcppt::log::parameters::object::context_location. Logger objects can then later be queried providing their location using this class.
|Constructs a context with no locations. |
|Destroys a context. |
|fcppt::log::optional_object const||find (fcppt::log::location const &location) const|
|Searches for a logger with a given location. |
|void||apply (fcppt::log::location const &location, fcppt::log::tree_function const &function)|
|Applies a function to all logers given a location recursively. |
Constructs a context with no locations.
Destroys a context.
It is important that all the logger objects that are associated with this context are already destroyed.
|void fcppt::log::context::apply||(||fcppt::log::location const &||location,|
|fcppt::log::tree_function const &||function|
Applies a function to all logers given a location recursively.
Applies function to the loggers at location and below.
|fcppt::log::no_such_location||if the location doesn't exist|
|fcppt::log::optional_object const fcppt::log::context::find||(||fcppt::log::location const &||location||)||const|
Searches for a logger with a given location.
Searches for a logger whose location is location.
|location||The location to search|