Class Poco::ConsoleChannel
Author: Applied Informatics Software Engineering GmbH and Contributors

# Poco

# class ConsoleChannel

Library: Foundation
Package: Logging
Header: Poco/ConsoleChannel.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.

Similar to StreamChannel, except that a static mutex is used to protect against multiple console channels concurrently writing to the same stream.

## 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

## Constructors

### ConsoleChannel

ConsoleChannel();

Creates the channel and attaches std::clog.

### ConsoleChannel

ConsoleChannel(
std::ostream & str
);

Creates the channel using the given stream.

## Destructor

### ~ConsoleChannel

~ConsoleChannel();

## Member Functions

### log

void log(
const Message & msg
);

Logs the given message to the channel's stream.

See also: Poco::Channel::log()