GeNN  4.9.0
GPU enhanced Neuronal Networks (GeNN)
logging.h
Go to the documentation of this file.
1 #pragma once
2 
3 // PLOG includes
4 #include <plog/Log.h>
5 #include <plog/Severity.h>
6 
7 // GeNN includes
8 #include "gennExport.h"
9 
10 // Forward declarations
11 namespace plog
12 {
13 class IAppender;
14 }
15 
16 //----------------------------------------------------------------------------
17 // Macros
18 //----------------------------------------------------------------------------
19 // Shorthand macros for logging to 'GeNN' channel
20 #define LOGV_GENN LOGV_(Logging::CHANNEL_GENN)
21 #define LOGD_GENN LOGD_(Logging::CHANNEL_GENN)
22 #define LOGI_GENN LOGI_(Logging::CHANNEL_GENN)
23 #define LOGW_GENN LOGW_(Logging::CHANNEL_GENN)
24 #define LOGE_GENN LOGE_(Logging::CHANNEL_GENN)
25 #define LOGF_GENN LOGF_(Logging::CHANNEL_GENN)
26 
27 // Shorthand macros for logging to 'code generator' channel
28 #define LOGV_CODE_GEN LOGV_(Logging::CHANNEL_CODE_GEN)
29 #define LOGD_CODE_GEN LOGD_(Logging::CHANNEL_CODE_GEN)
30 #define LOGI_CODE_GEN LOGI_(Logging::CHANNEL_CODE_GEN)
31 #define LOGW_CODE_GEN LOGW_(Logging::CHANNEL_CODE_GEN)
32 #define LOGE_CODE_GEN LOGE_(Logging::CHANNEL_CODE_GEN)
33 #define LOGF_CODE_GEN LOGF_(Logging::CHANNEL_CODE_GEN)
34 
35 // Shorthand macros for logging to 'backend' channel
36 #define LOGV_BACKEND LOGV_(Logging::CHANNEL_BACKEND)
37 #define LOGD_BACKEND LOGD_(Logging::CHANNEL_BACKEND)
38 #define LOGI_BACKEND LOGI_(Logging::CHANNEL_BACKEND)
39 #define LOGW_BACKEND LOGW_(Logging::CHANNEL_BACKEND)
40 #define LOGE_BACKEND LOGE_(Logging::CHANNEL_BACKEND)
41 #define LOGF_BACKEND LOGF_(Logging::CHANNEL_BACKEND)
42 
43 
44 //----------------------------------------------------------------------------
45 // Logging
46 //----------------------------------------------------------------------------
47 namespace Logging
48 {
49 enum Channel
50 {
55 };
56 
57 GENN_EXPORT void init(plog::Severity gennLevel, plog::Severity codeGeneratorLevel,
58  plog::IAppender *gennAppender, plog::IAppender *codeGeneratorAppender);
59 }
Definition: logging.h:52
Definition: logging.h:11
Channel
Definition: logging.h:49
Definition: logging.h:47
#define GENN_EXPORT
Definition: gennExport.h:13
Definition: logging.h:53
GENN_EXPORT void init(plog::Severity gennLevel, plog::Severity codeGeneratorLevel, plog::IAppender *gennAppender, plog::IAppender *codeGeneratorAppender)
Definition: logging.cc:6
Definition: logging.h:54
Definition: logging.h:51