Poco

class SplitterChannel

Library: Foundation
Package: Logging
Header: Poco/SplitterChannel.h

Description

This channel sends a message to multiple channels simultaneously.

Inheritance

Direct Base Classes: Channel

All Base Classes: Channel, Configurable, RefCountedObject

Known Derived Classes: Poco::Net::RemoteSyslogListener

Member Summary

Member Functions: addChannel, close, count, log, removeChannel, setProperty

Inherited Functions: close, duplicate, getProperty, log, open, referenceCount, release, setProperty

Types Aliases

Ptr

using Ptr = AutoPtr < SplitterChannel >;

Constructors

SplitterChannel

SplitterChannel();

Creates the SplitterChannel.

Destructor

~SplitterChannel protected virtual

~SplitterChannel();

Member Functions

addChannel

void addChannel(
    Channel::Ptr pChannel
);

Attaches a channel, which may not be null.

close virtual

void close();

Removes all channels.

count

int count() const;

Returns the number of channels in the SplitterChannel.

log virtual

void log(
    const Message & msg
);

Sends the given Message to all attaches channels.

removeChannel

void removeChannel(
    Channel::Ptr pChannel
);

Removes a channel.

setProperty 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".