Phoxonics  1.0
Object Oriented FDTD Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Logger.hpp
Go to the documentation of this file.
1 /*
2  * Logger.hpp
3  *
4  * Created on: Nov 23, 2012
5  * Author: nano
6  */
7 
8 #ifndef LOGGER_HPP_
9 #define LOGGER_HPP_
10 
11 //#include <iostream>
12 #include <fstream>
13 #include <string>
14 #include <sstream>
15 #include <iomanip>
16 #include <algorithm>
17 #include "DateTime.hpp"
18 #include "SingleLoggerConfig.hpp"
19 
20 namespace phoxonics {
21 namespace common {
22 
23 class Logger {
24 public:
25  explicit Logger();
26  ~Logger();
27 
28  void log_info(std::string message);
29  void log_warning(std::string message);
30  void log_error(std::string message);
31  void log_fatal(std::string message);
32  void log_trac(std::string message);
33 
34  void refresh_config();
35  void add_tracing();
36  void remove_tracing();
37 
38 private:
39  std::string log_file_path_ { "" };
40  bool log_to_console_ { false };
41  std::string show_log_level_ { "" };
42 
44  void log(std::string message, int level);
45 };
46 
47 }
48 }
49 
50 #endif /* LOGGER_HPP_ */
void add_tracing()
Definition: Logger.cpp:100
void log_error(std::string message)
Definition: Logger.cpp:40
void log_trac(std::string message)
Definition: Logger.cpp:28
~Logger()
Definition: Logger.cpp:25
Definition: CommonBase.hpp:14
void remove_tracing()
Definition: Logger.cpp:106
void refresh_config()
Definition: Logger.cpp:94
void log_warning(std::string message)
Definition: Logger.cpp:36
Definition: DateTime.hpp:21
Definition: Logger.hpp:23
Logger()
Definition: Logger.cpp:16
void log_info(std::string message)
Definition: Logger.cpp:32
void log_fatal(std::string message)
Definition: Logger.cpp:44