Poco

class StreamChannel

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

Description

A channel that writes to an ostream.

Only the message's text is written, followed by a newline.

Chain this channel to a FormattingChannel with an appropriate Formatter to control what is contained in the text.

Inheritance

Direct Base Classes: Channel

All Base Classes: Channel, Configurable, RefCountedObject

Member Summary

Member Functions: log

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

Types Aliases

Ptr

using Ptr = AutoPtr < StreamChannel >;

Constructors

StreamChannel

StreamChannel(
    std::ostream & str
);

Creates the channel.

Destructor

~StreamChannel protected virtual

virtual ~StreamChannel();

Member Functions

log virtual

void log(
    const Message & msg
);

Logs the given message to the channel's stream.