Medical Imaging Interaction Toolkit  2023.04.00
Medical Imaging Interaction Toolkit
mitkLog.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 mitkLog_h
14 #define mitkLog_h
15 
16 #include <MitkCoreExports.h>
17 #include <mbilog.h>
18 
19 namespace mitk
20 {
25  {
26  public:
29  void ProcessMessage(const mbilog::LogMessage &) override;
30 
33  static void Register();
34 
37  static void Unregister();
38 
41  static void SetLogFile(const char *file);
42 
61  static void RotateLogFiles(const std::string &prefixPath);
62 
77  static std::string IncrementLogFileNames(const std::string &prefixPath, int numLogFiles = 10);
78 
82  static std::string GetLogFile();
83 
87  static void EnableAdditionalConsoleWindow(bool enable);
88 
92  static void CatchLogFileCommandLineParameter(int &argc, char **argv);
93 
94  mbilog::OutputType GetOutputType() const override;
95 
96  protected:
100  static bool CheckIfFileExists(const std::string &filename);
101  };
102 }
103 
104 #endif
mbilog::LogMessage
An object of this class represents a single logging message (logging event) of the mbi logging mechan...
Definition: mbilogLogMessage.h:30
mitk
DataCollection - Class to facilitate loading/accessing structured data.
Definition: RenderingTests.dox:1
mbilog.h
mitk::LoggingBackend
mbilog backend implementation for mitk
Definition: mitkLog.h:24
MitkCoreExports.h
mbilog::TextBackendBase
This class is an abstract superclass for logging text backends. It adds string formatting methods to ...
Definition: mbilogTextBackendBase.h:28
mbilog::OutputType
OutputType
Definition: mbilogBackendBase.h:26
MITKCORE_EXPORT
#define MITKCORE_EXPORT
Definition: MitkCoreExports.h:15