activemq-cpp-3.6.0
decaf::util::logging::ConsoleHandler Class Reference

This Handler publishes log records to System.err. More...

#include <src/main/decaf/util/logging/ConsoleHandler.h>

Inheritance diagram for decaf::util::logging::ConsoleHandler:

Public Member Functions

 ConsoleHandler ()
virtual ~ConsoleHandler ()
virtual void close ()
 Close the current output stream.
virtual void publish (const LogRecord &record)
 Publish the Log Record to this Handler.
- Public Member Functions inherited from decaf::util::logging::StreamHandler
 StreamHandler ()
 Create a StreamHandler, with no current output stream.
 StreamHandler (decaf::io::OutputStream *stream, Formatter *formatter)
 Create a StreamHandler, with no current output stream.
virtual ~StreamHandler ()
virtual void flush ()
 Flush the Handler's output, clears any buffers.
virtual bool isLoggable (const LogRecord &record) const
 Check if this Handler would actually log a given LogRecord.
- Public Member Functions inherited from decaf::util::logging::Handler
 Handler ()
virtual ~Handler ()
virtual void setFilter (Filter *filter)
 Sets the Filter that this Handler uses to filter Log Records.
virtual FiltergetFilter ()
 Gets the Filter that this Handler uses to filter Log Records.
virtual void setLevel (const Level &value)
 Set the log level specifying which message levels will be logged by this Handler.
virtual Level getLevel ()
 Get the log level specifying which message levels will be logged by this Handler.
virtual void setFormatter (Formatter *formatter)
 Sets the Formatter used by this Handler.
virtual FormattergetFormatter ()
 Gets the Formatter used by this Handler.
virtual void setErrorManager (ErrorManager *errorManager)
 Sets the Formatter used by this Handler.
virtual ErrorManagergetErrorManager ()
 Gets the ErrorManager used by this Handler.
- Public Member Functions inherited from decaf::io::Closeable
virtual ~Closeable ()

Additional Inherited Members

- Protected Member Functions inherited from decaf::util::logging::StreamHandler
virtual void setOuputStream (decaf::io::OutputStream *stream)
 Change the output stream.
void close (bool closeStream)
 Closes this handler, but the underlying output stream is only closed if closeStream is true.

Detailed Description

This Handler publishes log records to System.err.

By default the SimpleFormatter is used to generate brief summaries.

Configuration: By default each ConsoleHandler is initialized using the following LogManager configuration properties. If properties are not defined (or have invalid values) then the specified default values are used.

ConsoleHandler.level specifies the default level for the Handler (defaults to Level.INFO). ConsoleHandler.filter specifies the name of a Filter class to use (defaults to no Filter). ConsoleHandler.formatter specifies the name of a Formatter class to use (defaults to SimpleFormatter).

Since
1.0

Constructor & Destructor Documentation

decaf::util::logging::ConsoleHandler::ConsoleHandler ( )
virtual decaf::util::logging::ConsoleHandler::~ConsoleHandler ( )
inlinevirtual

Member Function Documentation

virtual void decaf::util::logging::ConsoleHandler::close ( )
virtual

Close the current output stream.

Override the StreamHandler close to flush the Std Err stream but doesn't close.

Exceptions
IOException

Reimplemented from decaf::util::logging::StreamHandler.

virtual void decaf::util::logging::ConsoleHandler::publish ( const LogRecord record)
virtual

Publish the Log Record to this Handler.

Parameters
recordThe LogRecord to Publish

Reimplemented from decaf::util::logging::StreamHandler.


The documentation for this class was generated from the following file: