class Poco::SplitterChannel

Overview

This channel sends a message to multiple channels simultaneously. More…

#include <SplitterChannel.h>

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

    void
    addChannel(Channel* pChannel);

    void
    removeChannel(Channel* pChannel);

    virtual
    void
    log(const Message& msg);

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

    virtual
    void
    close();

    int
    count() const;
};

// direct descendants

class RemoteSyslogListener;

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

This channel sends a message to multiple channels simultaneously.

Methods

void
addChannel(Channel* pChannel)

Attaches a channel, which may not be null.

void
removeChannel(Channel* pChannel)

Removes a channel.

virtual
void
log(const Message& msg)

Sends the given Message to all attaches channels.

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

Sets or changes a configuration property.

Only the “channel” property is supported, which allows adding a comma-separated list of channels via the LoggingRegistry. The “channel” property is set-only. To simplify file-based configuration, all property names starting with “channel” are treated as “channel”.

virtual
void
close()

Removes all channels.

int
count() const

Returns the number of channels in the SplitterChannel.