Belle II Software
release-08-02-06
Main Page
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
z
Variables
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
v
w
x
z
Typedefs
a
b
c
d
e
g
i
k
l
m
n
p
r
s
t
u
v
w
Enumerations
a
b
c
e
f
g
n
p
s
v
z
Enumerator
c
d
f
p
t
u
v
w
Classes
Class List
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Enumerations
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
Enumerator
a
b
c
d
e
f
g
h
k
l
m
n
o
p
r
s
t
u
v
w
z
Related Functions
b
c
d
g
i
o
r
s
t
Files
File List
File Members
All
Functions
Typedefs
Macros
LogFile.h
1
/**************************************************************************
2
* basf2 (Belle II Analysis Software Framework) *
3
* Author: The Belle II Collaboration *
4
* *
5
* See git log for contributors and copyright holders. *
6
* This file is licensed under LGPL-3.0, see LICENSE.md. *
7
**************************************************************************/
8
#ifndef _Belle2_LogFile_h
9
#define _Belle2_LogFile_h
10
11
#include <daq/slc/system/Mutex.h>
12
13
#include <daq/slc/base/Date.h>
14
15
#include <string>
16
#include <fstream>
17
#include <stdarg.h>
18
19
namespace
Belle2
{
25
struct
LogFile
{
26
27
public
:
28
enum
Priority {
29
UNKNOWN = 0, DEBUG, INFO, NOTICE, WARNING, ERROR, FATAL
30
};
31
32
public
:
33
static
Priority getPriority(
const
std::string& str);
34
35
private
:
36
LogFile
() {}
37
~
LogFile
() {}
38
39
private
:
40
static
bool
g_stderr;
41
static
bool
g_opened;
42
static
std::string g_filepath;
43
static
std::string g_linkpath;
44
static
std::ofstream g_stream;
45
static
unsigned
int
g_filesize;
46
static
Mutex
g_mutex;
47
static
Priority g_threshold;
48
static
std::string g_filename;
49
static
Date
g_date;
50
51
// member functions
52
public
:
53
static
void
open(
const
std::string& filename,
54
Priority priority = UNKNOWN);
55
static
void
open();
56
static
void
close();
57
static
void
debug(
const
std::string& msg, ...);
58
static
void
info(
const
std::string& msg, ...);
59
static
void
notice(
const
std::string& msg, ...);
60
static
void
warning(
const
std::string& msg, ...);
61
static
void
error(
const
std::string& msg, ...);
62
static
void
fatal(
const
std::string& msg, ...);
63
static
void
put(Priority priority,
const
std::string& msg, ...);
64
static
void
setStdErr(
bool
stdErr)
65
{
66
g_stderr = stdErr;
67
}
68
69
private
:
70
static
int
put_impl(
const
std::string& msg, Priority priority, va_list ap);
71
72
};
73
75
};
76
77
#endif
Belle2::Date
Definition:
Date.h:19
Belle2::Mutex
Definition:
Mutex.h:19
Belle2
Abstract base class for different kinds of events.
Definition:
MillepedeAlgorithm.h:17
Belle2::LogFile
Definition:
LogFile.h:25
daq
slc
system
include
LogFile.h
Generated on Tue Jan 28 2025 01:53:39 for Belle II Software by
1.9.1