| The Gaudi Framework v27r1

- 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 },
6 m_oost{ new std::ofstream(file) }, m_ost{ m_oost.get() }
7 {
8 if (!m_oost) throw std::invalid_argument("can't open file");
9 }
10
11 StreamLogger::StreamLogger(IMessageSvc *svc, MSG::Level lev):
12 m_name{ "MsgStream" },
13 m_msgStr{ new MsgStream( svc, "IssueLogger") },
14 m_level{ lev }
15 { }
16
17 StreamLogger::StreamLogger(std::ostream& ost):
18 m_name{ &ost == &std::cerr ? "STDERR" :
19 &ost == &std::cout ? "STDOUT" :
20 "unknown ostream" },
21 m_ost{ &ost }
22 { }
MsgStream
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
StreamLogger::StreamLogger
StreamLogger(const std::string &file)
Definition: StreamLogger.cpp:4
std::string
STL class.
MSG::Level
Level
Definition: IMessageSvc.h:15
std::ofstream
STL class.
IMessageSvc
The IMessage is the interface implemented by the message service.
Definition: IMessageSvc.h:57
ana.file
list file
Definition: ana.py:160
StreamLogger.h
std::ostream
STL class.
std::invalid_argument
STL class.