ATLAS Offline Software
Loading...
Searching...
No Matches
MsgLevel.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3*/
4
5// Local include(s):
7
9#define DECLARE_LEVEL( NAME ) \
10 case MSG::NAME: \
11 { \
12 static const std::string name( #NAME ); \
13 return name; \
14 } \
15 break
16
17namespace MSG {
18
19 const std::string& name( Level lvl ) {
20
21 switch( lvl ) {
22 DECLARE_LEVEL( NIL );
23 DECLARE_LEVEL( VERBOSE );
25 DECLARE_LEVEL( INFO );
26 DECLARE_LEVEL( WARNING );
27 DECLARE_LEVEL( ERROR );
28 DECLARE_LEVEL( FATAL );
29 DECLARE_LEVEL( ALWAYS );
30 default:
31 static const std::string dummy( "<unknown>" );
32 return dummy;
33 break;
34 }
35 }
36
37} // namespace MSG
#define DECLARE_LEVEL(NAME)
Helper macro for constructing the function's code.
Definition MsgLevel.cxx:9
Definition of message levels and a helper function.
Definition MsgLevel.h:28
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
Definition MsgLevel.cxx:19
#define DEBUG
Definition page_access.h:11