BayesianAnalysisToolkit
0.9.3
Main Page
Namespaces
Classes
Files
File List
File Members
BAT
BCLog.h
Go to the documentation of this file.
1
#ifndef __BCLOG__H
2
#define __BCLOG__H
3
15
/*
16
* Copyright (C) 2007-2013, the BAT core developer team
17
* All rights reserved.
18
*
19
* For the licensing terms see doc/COPYING.
20
* For documentation see http://mpp.mpg.de/bat
21
*/
22
23
// ---------------------------------------------------------
24
25
#include <iostream>
26
27
// ---------------------------------------------------------
28
29
class
BCLog
30
{
31
public
:
32
33
// definition of log level
34
45
enum
LogLevel
{
debug
,
detail
,
summary
,
warning
,
error
,
nothing
};
46
52
BCLog
();
53
56
~BCLog
();
57
65
static
BCLog::LogLevel
GetLogLevelFile
()
66
{
return
fMinimumLogLevelFile
; };
67
71
static
BCLog::LogLevel
GetLogLevelScreen
()
72
{
return
fMinimumLogLevelScreen
; };
73
81
static
void
SetLogLevelFile
(
BCLog::LogLevel
loglevel)
82
{
BCLog::fMinimumLogLevelFile
= loglevel; };
83
87
static
void
SetLogLevelScreen
(
BCLog::LogLevel
loglevel)
88
{
BCLog::fMinimumLogLevelScreen
= loglevel; };
89
94
static
void
SetLogLevel
(
BCLog::LogLevel
loglevelscreen,
BCLog::LogLevel
loglevelfile)
95
{
BCLog::fMinimumLogLevelFile
= loglevelfile;
BCLog::fMinimumLogLevelScreen
= loglevelscreen; };
96
100
static
void
SetLogLevel
(
BCLog::LogLevel
loglevel)
101
{
SetLogLevel
(loglevel, loglevel); };
102
112
static
void
OpenLog
(
const
char
* filename,
BCLog::LogLevel
loglevelfile,
BCLog::LogLevel
loglevelscreen);
113
114
static
void
OpenLog
(
const
char
* filename);
115
116
static
void
OpenLog
();
117
120
static
bool
IsOpen
();
121
124
static
void
CloseLog
();
125
131
static
void
Out
(
BCLog::LogLevel
loglevelfile,
BCLog::LogLevel
loglevelscreen,
const
char
* message);
132
133
static
void
Out
(
const
char
* message);
134
135
static
void
Out
(
BCLog::LogLevel
loglevel,
const
char
* message)
136
{
Out
(loglevel,loglevel,message); };
137
138
static
void
OutError
(
const
char
* message)
139
{
Out
(
error
,message); };
140
141
static
void
OutWarning
(
const
char
* message)
142
{
Out
(
warning
,message); };
143
144
static
void
OutSummary
(
const
char
* message)
145
{
Out
(
summary
,message); };
146
147
static
void
OutDetail
(
const
char
* message)
148
{
Out
(
detail
,message); };
149
150
static
void
OutDebug
(
const
char
* message)
151
{
Out
(
debug
,message); };
152
155
static
void
StartupInfo
();
156
159
static
const
char
*
GetVersion
()
160
{
return
fVersion
; };
161
164
static
int
GetHIndex
()
165
{
return
BCLog::fHindex
++; };
166
169
static
const
char
*
ToString
(
BCLog::LogLevel
);
170
172
private
:
173
176
static
const
char
*
fVersion
;
177
180
static
BCLog::LogLevel
fMinimumLogLevelFile
;
181
184
static
BCLog::LogLevel
fMinimumLogLevelScreen
;
185
188
static
std::ofstream
fOutputStream
;
189
192
static
bool
fFirstOutputDone
;
193
196
static
int
fHindex
;
197
};
198
199
// ---------------------------------------------------------
200
201
#endif
Generated by
1.8.4