1 /*
2  *  logging.h
3  *
4  *  This file is part of NEST.
5  *
6  *  Copyright (C) 2004 The NEST Initiative
7  *
8  *  NEST is free software: you can redistribute it and/or modify
9  *  it under the terms of the GNU General Public License as published by
10  *  the Free Software Foundation, either version 2 of the License, or
11  *  (at your option) any later version.
12  *
13  *  NEST is distributed in the hope that it will be useful,
14  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  *  GNU General Public License for more details.
17  *
18  *  You should have received a copy of the GNU General Public License
19  *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
20  *
21  */
22 
23 #ifndef LOGGING_H
24 #define LOGGING_H
25 
26 /**
27  *
28  */
29 #define LOG( s, fctn, msg ) nest::kernel().logging_manager.publish_log( ( s ), ( fctn ), ( msg ), __FILE__, __LINE__ )
30 
31 /**
32  *
33  */
34 #define ALL_ENTRIES_ACCESSED( d, fctn, msg ) \
35   nest::kernel().logging_manager.all_entries_accessed( ( d ), ( fctn ), ( msg ), __FILE__, __LINE__ )
36 
37 /**
38  *
39  */
40 #define ALL_ENTRIES_ACCESSED2( d, fctn, msg1, msg2 ) \
41   nest::kernel().logging_manager.all_entries_accessed( ( d ), ( fctn ), ( msg1 ), ( msg2 ), __FILE__, __LINE__ )
42 
43 namespace nest
44 {
45 
46 class LoggingEvent;
47 class LoggingDeliverer;
48 
49 enum severity_t
50 {
51   M_ALL = 0,
52   M_DEBUG = 5,
53   M_STATUS = 7,
54   M_INFO = 10,
55   M_PROGRESS = 15,
56   M_DEPRECATED = 18,
57   M_WARNING = 20,
58   M_ERROR = 30,
59   M_FATAL = 40,
60   M_QUIET = 100
61 };
62 
63 typedef void ( *deliver_logging_event_ptr )( const LoggingEvent& e );
64 }
65 
66 #endif
67