class Poco::NullChannel

Overview

The NullChannel is the /dev/null of Channels. Moreā€¦

#include <NullChannel.h>

class NullChannel: public Poco::Channel
{
public:
    // methods

    virtual
    void
    log(const Message& msg);

    virtual
    void
    setProperty(
        const std::string& name,
        const std::string& value
        );
};

Inherited Members

public:
    // methods

    virtual
    void
    setProperty(
        const std::string& name,
        const std::string& value
        ) = 0;

    virtual
    std::string
    getProperty(const std::string& name) const = 0;

    void
    duplicate() const;

    void
    release() const;

    int
    referenceCount() const;

    virtual
    void
    open();

    virtual
    void
    close();

    virtual
    void
    log(const Message& msg) = 0;

    virtual
    void
    setProperty(
        const std::string& name,
        const std::string& value
        );

    virtual
    std::string
    getProperty(const std::string& name) const;

Detailed Documentation

The NullChannel is the /dev/null of Channels.

A NullChannel discards all information sent to it. Furthermore, its setProperty() method ignores all properties, so it the NullChannel has the nice feature that it can stand in for any other channel class in a logging configuration.

Construction

~NullChannel()

Destroys the NullChannel.

Methods

virtual
void
log(const Message& msg)

Does nothing.

virtual
void
setProperty(
    const std::string& name,
    const std::string& value
    )

Ignores both name and value.