The Gaudi Framework
v29r0 (ff2e7097)
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
StreamLogger.cpp
Go to the documentation of this file.
1
#include "
StreamLogger.h
"
2
#include <fstream>
3
4
StreamLogger::StreamLogger
(
const
std::string
& file )
5
: m_name{
"file:"
+ file},
m_oost
{
new
std::ofstream
( file )},
m_ost
{
m_oost
.
get
()}
6
{
7
if
( !
m_oost
)
throw
std::invalid_argument
(
"can't open file"
);
8
}
9
10
StreamLogger::StreamLogger
(
IMessageSvc
* svc,
MSG::Level
lev )
11
:
m_name
{
"MsgStream"
},
m_msgStr
{
new
MsgStream
( svc,
"IssueLogger"
)},
m_level
{lev}
12
{
13
}
14
15
StreamLogger::StreamLogger
(
std::ostream
& ost )
16
:
m_name
{&ost == &
std::cerr
?
"STDERR"
: &ost == &
std::cout
?
"STDOUT"
:
"unknown ostream"
},
m_ost
{&ost}
17
{
18
}
MsgStream
Definition of the MsgStream class used to transmit messages.
Definition:
MsgStream.h:24
StreamLogger::m_msgStr
std::unique_ptr< MsgStream > m_msgStr
Definition:
StreamLogger.h:27
StreamLogger::StreamLogger
StreamLogger(const std::string &file)
Definition:
StreamLogger.cpp:4
StreamLogger::m_name
std::string m_name
Definition:
StreamLogger.h:24
std::string
STL class.
MSG::Level
Level
Definition:
IMessageSvc.h:16
std::ofstream
STL class.
IMessageSvc
The IMessage is the interface implemented by the message service.
Definition:
IMessageSvc.h:38
std::unique_ptr::get
T get(T...args)
StreamLogger.h
StreamLogger::m_oost
std::unique_ptr< std::ostream > m_oost
Definition:
StreamLogger.h:25
std::ostream
STL class.
std::invalid_argument
STL class.
StreamLogger::m_level
MSG::Level m_level
Definition:
StreamLogger.h:28
StreamLogger::m_ost
std::ostream * m_ost
Definition:
StreamLogger.h:26
GaudiMonitor
src
StreamLogger.cpp
Generated on Tue Sep 26 2017 11:39:07 for The Gaudi Framework by
1.8.11