Library: Foundation
Package: Logging
Header: Poco/LoggingRegistry.h
A registry for channels and formatters.
The LoggingRegistry class is used for configuring the logging framework.
Member Functions: channelForName, clear, defaultRegistry, formatterForName, registerChannel, registerFormatter, unregisterChannel, unregisterFormatter
Creates the LoggingRegistry.
~LoggingRegistry();
Destroys the LoggingRegistry.
Channel * channelForName(
const std::string & name
) const;
Returns the Channel object which has been registered under the given name.
Throws a NotFoundException if the name is unknown.
void clear();
Unregisters all registered channels and formatters.
static LoggingRegistry & defaultRegistry();
Returns a reference to the default LoggingRegistry.
Formatter * formatterForName(
const std::string & name
) const;
Returns the Formatter object which has been registered under the given name.
Throws a NotFoundException if the name is unknown.
void registerChannel(
const std::string & name,
Channel * pChannel
);
Registers a channel under a given name. It is okay to re-register a different channel under an already existing name.
void registerFormatter(
const std::string & name,
Formatter * pFormatter
);
Registers a formatter under a given name. It is okay to re-register a different formatter under an already existing name.
void unregisterChannel(
const std::string & name
);
Unregisters the given channel.
Throws a NotFoundException if the name is unknown.
void unregisterFormatter(
const std::string & name
);
Unregisters the given formatter.
Throws a NotFoundException if the name is unknown.