Medical Imaging Interaction Toolkit  2018.4.99-eed36131
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 _MITK_LOG_H
14 #define _MITK_LOG_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
#define MITKCORE_EXPORT
DataCollection - Class to facilitate loading/accessing structured data.
An object of this class represents a single logging message (logging event) of the mbi logging mechan...
This class is an abstract superclass for logging text backends. It adds string formatting methods to ...
mbilog backend implementation for mitk
Definition: mitkLog.h:24