# Poco

# class LogStreamBuf

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

## Description

This class implements a streambuf interface to a Logger.

The streambuf appends all characters written to it to a string. As soon as a CR or LF (std::endl) is written, the string is sent to the Logger, with the set priority.

## Inheritance

Direct Base Classes: UnbufferedStreamBuf

All Base Classes: UnbufferedStreamBuf

## Member Summary

Member Functions: getPriority, logger, setPriority

## Constructors

### LogStreamBuf

LogStreamBuf(
Logger & logger,
Message::Priority priority
);

Creates the LogStream.

## Destructor

### ~LogStreamBuf

~LogStreamBuf();

Destroys the LogStream.

## Member Functions

### getPriority

Message::Priority getPriority() const;

Returns the priority for log messages.

### logger

Logger & logger() const;

Returns a reference to the Logger.

### setPriority

void setPriority(
Message::Priority priority
);

Sets the priority for log messages.