1//
2// StreamChannel.cpp
3//
4// Library: Foundation
5// Package: Logging
6// Module: StreamChannel
7//
8// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
9// and Contributors.
10//
11// SPDX-License-Identifier: BSL-1.0
12//
13
14
15#include "Poco/StreamChannel.h"
16#include "Poco/Message.h"
17
18
19namespace Poco {
20
21
22StreamChannel::StreamChannel(std::ostream& str): _str(str)
23{
24}
25
26
27StreamChannel::~StreamChannel()
28{
29}
30
31
32void StreamChannel::log(const Message& msg)
33{
34 FastMutex::ScopedLock lock(_mutex);
35 _str << msg.getText() << std::endl;
36}
37
38
39} // namespace Poco
40