Lugdunum
0.1.0
src
lug
System
Logger
OstreamHandler.cpp
Go to the documentation of this file.
1
#include <iostream>
2
#include <
lug/System/Logger/OstreamHandler.hpp
>
3
#include <
lug/System/Logger/Message.hpp
>
4
5
namespace
lug
{
6
namespace
System {
7
namespace
Logger {
8
9
OstreamHandler::OstreamHandler
(
const
std::string& name, std::ostream& out) :
Handler
(name), _os(out) {}
10
11
void
OstreamHandler::handle
(
const
priv::Message& msg) {
12
_os
<< msg.formatted.c_str();
13
}
14
15
void
OstreamHandler::flush
() {
16
_os
<< std::flush;
17
}
18
19
StdoutHandler::StdoutHandler
(
const
std::string& name) :
OstreamHandler
(name,
std
::cout) {}
20
StderrHandler::StderrHandler
(
const
std::string& name) :
OstreamHandler
(name,
std
::cerr) {}
21
22
}
// Logger
23
}
// System
24
}
// lug
Message.hpp
lug::System::Logger::Handler
Definition:
Handler.hpp:15
lug::System::Logger::OstreamHandler
Definition:
OstreamHandler.hpp:11
lug::System::Logger::StderrHandler::StderrHandler
StderrHandler(const std::string &name)
Definition:
OstreamHandler.cpp:20
std
Definition:
Pipeline.hpp:231
lug::System::Logger::StdoutHandler::StdoutHandler
StdoutHandler(const std::string &name)
Definition:
OstreamHandler.cpp:19
lug::System::Logger::OstreamHandler::_os
std::ostream & _os
Definition:
OstreamHandler.hpp:27
lug::System::Logger::OstreamHandler::flush
void flush() final
Definition:
OstreamHandler.cpp:15
lug::System::Logger::OstreamHandler::handle
void handle(const priv::Message &msg) final
Definition:
OstreamHandler.cpp:11
lug
Definition:
Application.hpp:11
lug::System::Logger::OstreamHandler::OstreamHandler
OstreamHandler(const std::string &name, std::ostream &out)
Definition:
OstreamHandler.cpp:9
OstreamHandler.hpp
Generated by
1.8.13