test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 //
20 // constants, enums and typedefs
21 //
22 
23 //
24 // static data member definitions
25 //
26 
27 namespace fwlog
28 {
29 
31 
32 const char* const s_levelNames[] = { "Debug","Info", "Warning", "Error" };
33 
34 const char* levelName(LogLevel iLevel) {
35  return s_levelNames[iLevel];
36 }
37 
38 std::ostream* s_logger = &std::cerr;
39 
40 std::ostream& logger() {
41  return *s_logger;
42 }
43 
44 void setLogger(std::ostream* iNewLogger) {
45  if (0==iNewLogger) {
47  } else {
48  s_logger=iNewLogger;
49  }
50 }
51 
53  return s_presentLevel;
54 }
56  s_presentLevel=iLevel;
57 }
58 
59 }
std::ostream * s_logger
Definition: fwLog.cc:38
std::ostream & logger()
Definition: fwLog.cc:40
const char *const s_levelNames[]
Definition: fwLog.cc:32
LogLevel presentLogLevel()
Definition: fwLog.cc:52
LogLevel
Definition: fwLog.h:35
LogLevel s_presentLevel
Definition: fwLog.cc:30
const char * levelName(LogLevel)
Definition: fwLog.cc:34
void setLogger(std::ostream *)
Definition: fwLog.cc:44
tuple cout
Definition: gather_cfg.py:145
void setPresentLogLevel(LogLevel)
Definition: fwLog.cc:55