Medical Imaging Interaction Toolkit  2016.11.0
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,
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 _MITK_LOG_H
18 #define _MITK_LOG_H
19 
20 #include <MitkCoreExports.h>
21 #include <mbilog.h>
22 
23 namespace mitk
24 {
29  {
30  public:
33  void ProcessMessage(const mbilog::LogMessage &) override;
34 
37  static void Register();
38 
41  static void Unregister();
42 
45  static void SetLogFile(const char *file);
46 
65  static void RotateLogFiles(const std::string &prefixPath);
66 
81  static std::string IncrementLogFileNames(const std::string &prefixPath, int numLogFiles = 10);
82 
86  static std::string GetLogFile();
87 
91  static void EnableAdditionalConsoleWindow(bool enable);
92 
96  static void CatchLogFileCommandLineParameter(int &argc, char **argv);
97 
98  virtual mbilog::OutputType GetOutputType() const override;
99 
100  protected:
104  static bool CheckIfFileExists(const std::string &filename);
105  };
106 }
107 
108 #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 ...
static const std::string filename
mbilog backend implementation for mitk
Definition: mitkLog.h:28