Jpp
software
JLogger
JStreamLogger.hh
Go to the documentation of this file.
1
#ifndef __JLOGGER__JSTREAMLOGGER__
2
#define __JLOGGER__JSTREAMLOGGER__
3
4
#include <ostream>
5
6
#include "
JLogger.hh
"
7
8
9
/**
10
* \author mdejong
11
*/
12
13
namespace
JLOGGER
{}
14
namespace
JPP
{
using namespace
JLOGGER
; }
15
16
namespace
JLOGGER
{
17
18
/**
19
* Message logging based on std::ostream.
20
* This class implements the JLogger interface.
21
*/
22
class
JStreamLogger
:
23
public
JLogger
24
{
25
public
:
26
/**
27
* Constructor.
28
*
29
* \param __out output stream
30
*/
31
JStreamLogger
(std::ostream& __out) :
32
out
(__out)
33
{}
34
35
36
/**
37
* Report message
38
*
39
* \param tag tag
40
* \param message message
41
*/
42
virtual
void
typeout
(
const
std::string& tag,
43
const
std::string& message)
44
{
45
out
<< tag <<
' '
<< message << std::endl;
46
}
47
48
protected
:
49
std::ostream&
out
;
50
};
51
}
52
53
#endif
JLOGGER::JLogger
Interface for logging messages.
Definition:
JLogger.hh:22
JLOGGER
Message logging.
Definition:
JControlHostLogger.hh:14
JLOGGER::JStreamLogger::JStreamLogger
JStreamLogger(std::ostream &__out)
Constructor.
Definition:
JStreamLogger.hh:31
JPP
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Definition:
JAAnetToolkit.hh:37
JLOGGER::JStreamLogger::out
std::ostream & out
Definition:
JStreamLogger.hh:49
JLogger.hh
JLOGGER::JStreamLogger
Message logging based on std::ostream.
Definition:
JStreamLogger.hh:22
JLOGGER::JStreamLogger::typeout
virtual void typeout(const std::string &tag, const std::string &message)
Report message.
Definition:
JStreamLogger.hh:42
Generated by
1.8.16