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 // $Id: fwLog.cc,v 1.2 2009/12/11 20:25:45 amraktad Exp $
12 //
13 
14 // system include files
15 
16 // user include files
18 
19 
20 //
21 // constants, enums and typedefs
22 //
23 
24 //
25 // static data member definitions
26 //
27 
28 namespace fwlog
29 {
30 
32 
33 const char* const s_levelNames[] = { "Debug","Info", "Warning", "Error" };
34 
35 const char* levelName(LogLevel iLevel) {
36  return s_levelNames[iLevel];
37 }
38 
39 std::ostream* s_logger = &std::cerr;
40 
41 std::ostream& logger() {
42  return *s_logger;
43 }
44 
45 void setLogger(std::ostream* iNewLogger) {
46  if (0==iNewLogger) {
48  } else {
49  s_logger=iNewLogger;
50  }
51 }
52 
54  return s_presentLevel;
55 }
57  s_presentLevel=iLevel;
58 }
59 
60 }
std::ostream * s_logger
Definition: fwLog.cc:39
std::ostream & logger()
Definition: fwLog.cc:41
const char *const s_levelNames[]
Definition: fwLog.cc:33
LogLevel presentLogLevel()
Definition: fwLog.cc:53
LogLevel
Definition: fwLog.h:36
LogLevel s_presentLevel
Definition: fwLog.cc:31
const char * levelName(LogLevel)
Definition: fwLog.cc:35
void setLogger(std::ostream *)
Definition: fwLog.cc:45
tuple cout
Definition: gather_cfg.py:121
void setPresentLogLevel(LogLevel)
Definition: fwLog.cc:56