Medical Imaging Interaction Toolkit  2023.04.00
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 (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef _mbilogLogMessage_H
14 #define _mbilogLogMessage_H
15 
16 #include <string>
17 
18 #include "mbilogExports.h"
19 
20 namespace mbilog
21 {
29  // todo convert to Struct
31  {
32  public:
33  // TODO: all member names m_[...]
34 
36  const int level;
37 
38  // the data of the following section is generated by the c-compiler
39 
42  const char *filePath;
45  const int lineNumber;
48  const char *functionName;
49 
50  // the data of the following section is generated by the mitk module system
51 
54  const char *moduleName;
55 
56  // user parameters
57 
59  std::string category;
60 
62  std::string message;
63 
64  LogMessage(const int _level, const char *_filePath, const int _lineNumber, const char *_functionName)
65  : level(_level), filePath(_filePath), lineNumber(_lineNumber), functionName(_functionName)
66  {
67  }
68  };
69 }
70 
71 #endif
MBILOG_EXPORT
#define MBILOG_EXPORT
Definition: mbilogExports.h:15
mbilog::LogMessage
An object of this class represents a single logging message (logging event) of the mbi logging mechan...
Definition: mbilogLogMessage.h:30
mbilog::LogMessage::LogMessage
LogMessage(const int _level, const char *_filePath, const int _lineNumber, const char *_functionName)
Definition: mbilogLogMessage.h:64
mbilog
Definition: mbilog.h:25
mbilogExports.h
mbilog::LogMessage::functionName
const char * functionName
Name of the method where the logging message was emitted which is generated by the macros in file mbi...
Definition: mbilogLogMessage.h:48
mbilog::LogMessage::level
const int level
Logging level which is defined in the enum mbilogLoggingTypes.h TODO: convert to enum.
Definition: mbilogLogMessage.h:36
mbilog::LogMessage::moduleName
const char * moduleName
Name of the module where the logging message was emitted which is generated by the macros in file mbi...
Definition: mbilogLogMessage.h:54
mbilog::LogMessage::category
std::string category
Category of the logging event, which was defined by the user.
Definition: mbilogLogMessage.h:59
mbilog::LogMessage::lineNumber
const int lineNumber
Line of the source source file where the logging message was emitted which is generated by the macros...
Definition: mbilogLogMessage.h:45
mbilog::LogMessage::message
std::string message
The actual logging message.
Definition: mbilogLogMessage.h:62
mbilog::LogMessage::filePath
const char * filePath
File name of the source file where the logging message was emitted which is generated by the macros i...
Definition: mbilogLogMessage.h:42