Brush C++ API
A flexible interpretable machine learning framework
Loading...
Searching...
No Matches
logger.h
Go to the documentation of this file.
1/* BrushUSH
2copyright 2017 William La Cava
3license: GNU/GPL v3
4*/
5
6#ifndef LOGGER_H
7#define LOGGER_H
8
9#include<iostream>
10using namespace std;
11
12namespace Brush {
13namespace Util{
14
19class Logger
20{
21public:
22
27 static Logger* initLogger();
28
32 static void destroy();
33
38 void set_log_level(int& verbosity);
39
44 int get_log_level();
45
53 string log(string m, int v, string sep="\n") const;
54
55private:
57 static Logger* instance;
58};
59
61
62}
63}
64#endif
void bind_engine(py::module &m, string name)
Defines a multi level static logger.
Definition logger.h:20
static void destroy()
Destroys the logger instance.
Definition logger.cpp:23
int get_log_level()
Gets the current log level.
Definition logger.cpp:44
static Logger * instance
The singleton instance of the logger.
Definition logger.h:57
void set_log_level(int &verbosity)
Sets the log level.
Definition logger.cpp:31
static Logger * initLogger()
Initializes the logger instance.
Definition logger.cpp:13
int verbosity
The current log level.
Definition logger.h:56
string log(string m, int v, string sep="\n") const
Prints a log message with verbosity control.
Definition logger.cpp:50
static Logger & logger
Definition logger.h:60
< nsga2 selection operator for getting the front
Definition data.cpp:12
STL namespace.