Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mbilogLogMessage.h
Go to the documentation of this file.
1 /*===================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef _mbilogLogMessage_H
18 #define _mbilogLogMessage_H
19 
20 #include <string>
21 
22 #include "mbilogExports.h"
23 
24 #ifdef _MSC_VER
25 #pragma warning(push)
26 #pragma warning(disable : 4251)
27 #endif
28 
29 namespace mbilog
30 {
38  // todo convert to Struct
40  {
41  public:
42  // TODO: all member names m_[...]
43 
45  const int level;
46 
47  // the data of the following section is generated by the c-compiler
48 
51  const char *filePath;
54  const int lineNumber;
57  const char *functionName;
58 
59  // the data of the following section is generated by the mitk module system
60 
63  const char *moduleName;
64 
65  // user parameters
66 
68  std::string category;
69 
71  std::string message;
72 
73  LogMessage(const int _level, const char *_filePath, const int _lineNumber, const char *_functionName)
74  : level(_level), filePath(_filePath), lineNumber(_lineNumber), functionName(_functionName)
75  {
76  }
77  };
78 }
79 
80 #ifdef _MSC_VER
81 #pragma warning(pop)
82 #endif
83 
84 #endif
const char * moduleName
Name of the module where the logging message was emitted which is generated by the macros in file mbi...
#define MBILOG_EXPORT
Definition: mbilogExports.h:15
const char * filePath
File name of the source file where the logging message was emitted which is generated by the macros i...
std::string message
The actual logging message.
An object of this class represents a single logging message (logging event) of the mbi logging mechan...
LogMessage(const int _level, const char *_filePath, const int _lineNumber, const char *_functionName)
const int lineNumber
Line of the source source file where the logging message was emitted which is generated by the macros...
const char * functionName
Name of the method where the logging message was emitted which is generated by the macros in file mbi...
std::string category
Category of the logging event, which was defined by the user.
const int level
Logging level which is defined in the enum mbilogLoggingTypes.h TODO: convert to enum.