vtkLogRecorder.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-FileCopyrightText: Copyright (c) Sandia Corporation
3 // SPDX-License-Identifier: BSD-3-Clause
4 
5 #ifndef vtkLogRecorder_h
6 #define vtkLogRecorder_h
7 
8 #include "vtkObject.h"
9 #include "vtkPVVTKExtensionsCoreModule.h" // needed for export
10 
11 #include <string> // for std::string
12 
22 {
23 public:
24  static vtkLogRecorder* New();
25 
26  vtkTypeMacro(vtkLogRecorder, vtkObject);
27  void PrintSelf(ostream& os, vtkIndent indent) override;
28 
34  ~vtkLogRecorder() override;
35 
37 
42  void SetVerbosity(int verbosity);
43  vtkGetMacro(Verbosity, int);
45 
47 
51  void SetRankEnabled(int rank);
52  void SetRankDisabled(int rank);
54 
58  const std::string& GetLogs() const;
59 
63  const std::string& GetStartingLog() const { return this->StartingLog; }
64 
68  vtkGetMacro(MyRank, int);
69 
73  void ClearLogs();
74 
78  void SetCategoryVerbosity(int categoryIndex, int verbosity);
79 
83  void ResetCategoryVerbosities();
84 
85 private:
86  vtkLogRecorder(const vtkLogRecorder&) = delete;
87  void operator=(const vtkLogRecorder&) = delete;
88  void EnableLoggingCallback();
89  void DisableLoggingCallback();
90 
91  int Verbosity;
92  std::string Logs;
93  std::string CallbackName;
94  std::string StartingLog;
95  int MyRank;
96  int RankEnabled = 0;
97 };
98 
99 #endif // vtkLogRecorder_h
#define VTKPVVTKEXTENSIONSCORE_EXPORT
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
const std::string & GetStartingLog() const
Get the starting log.
Record log messages at or below a given verbosity on a particular ParaView process/rank.
static vtkObject * New()
void operator=(const vtkObjectBase &)