CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
fwLog.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: Core
4 // Class : fwLog
5 //
6 // Implementation:
7 // [Notes on implementation]
8 //
9 // Original Author: Chris Jones
10 // Created: Tue Dec 8 23:10:10 CST 2009
11 //
12 
13 // system include files
14 
15 // user include files
17 
18 //
19 // constants, enums and typedefs
20 //
21 
22 //
23 // static data member definitions
24 //
25 
26 namespace fwlog {
27 
29 
30  const char* const s_levelNames[] = {"Debug", "Info", "Warning", "Error"};
31 
32  const char* levelName(LogLevel iLevel) { return s_levelNames[iLevel]; }
33 
34  std::ostream* s_logger = &std::cerr;
35 
36  std::ostream& logger() { return *s_logger; }
37 
38  void setLogger(std::ostream* iNewLogger) {
39  if (nullptr == iNewLogger) {
41  } else {
42  s_logger = iNewLogger;
43  }
44  }
45 
47  void setPresentLogLevel(LogLevel iLevel) { s_presentLevel = iLevel; }
48 
49 } // namespace fwlog
std::ostream * s_logger
Definition: fwLog.cc:34
std::ostream & logger()
Definition: fwLog.cc:36
const char *const s_levelNames[]
Definition: fwLog.cc:30
LogLevel presentLogLevel()
Definition: fwLog.cc:46
LogLevel
Definition: fwLog.h:35
LogLevel s_presentLevel
Definition: fwLog.cc:28
const char * levelName(LogLevel)
Definition: fwLog.cc:32
void setLogger(std::ostream *)
Definition: fwLog.cc:38
tuple cout
Definition: gather_cfg.py:144
void setPresentLogLevel(LogLevel)
Definition: fwLog.cc:47