OSFI-C++  3.11.0
OpenSF Integration Library
Logger.h
Go to the documentation of this file.
1 /*
2  * openSF Integration Libraries (OSFI)
3  * Deimos Space, S.L.U.
4  *
5  * This file is part of OSFI. OSFI is free software; you can redistribute it
6  * and/or modify it under the terms of the 'ESA Software Community Licence Permissive' as
7  * published by the European Space Agency; either version 2.4 of the License,
8  * or (at your option) any later version. You should have received a
9  * copy of the 'ESA Software Community Licence Permissive - v2.4' along with this program
10  * or one can be found at <http://eop-cfi.esa.int/index.php/docs-and-mission-data/licensing-documents>.
11  */
12 
17 #ifndef LOGGER
18 #define LOGGER
19 
20 #include <string>
21 #include <iostream>
22 
23 using namespace std;
24 
58 class Logger
59 {
60 public:
61 
66  static void error(const string& message);
67 
72  static void warning(const string& message);
73 
78  static void info(const string& message);
79 
87  static void debug(const string& message);
88 
93  static ostream & getErrorStream();
94 
101  static ostream & getDebugStream();
102 
107  static ostream & getInfoStream();
108 
113  static ostream & getWarningStream();
114 
120  static void progress(int step, int nSteps);
121 
128  [[noreturn]] static void finishExecution(int errorCode);
129 
135  static void qualityReport(const string& name, double value);
136 
142  static void qualityReport(const string& name, const string& value);
143 
148  static ostream & getQualityStream();
149 
153  bool static isDebugging();
154 
164  bool static isColored();
165 
166 private:
167 
171  static bool debugging;
172 
176  static bool colored;
177 
181  static const char delimitier;
182 
186  static const char * fileName;
187 
188 };
189 
190 #endif // LOGGER
Definition: Logger.h:59
static void debug(const string &message)
static bool isDebugging()
static ostream & getQualityStream()
static void finishExecution(int errorCode)
static void info(const string &message)
static void qualityReport(const string &name, const string &value)
static ostream & getWarningStream()
static void error(const string &message)
static void qualityReport(const string &name, double value)
static void warning(const string &message)
static ostream & getDebugStream()
static ostream & getInfoStream()
static bool isColored()
static ostream & getErrorStream()
static void progress(int step, int nSteps)