xtd - Reference Guide 0.2.0
trace_switch.h
Go to the documentation of this file.
1 #pragma once
5 #include "switch_base.h"
6 #include "debug.h"
7 #include "trace_level.h"
8 
10 namespace xtd {
12  namespace diagnostics {
26  class core_export_ trace_switch : public xtd::diagnostics::switch_base {
27  public:
29 
36  trace_switch(const xtd::ustring& display_name, const xtd::ustring& description);
42  trace_switch(const xtd::ustring& display_name, const xtd::ustring& description, const xtd::ustring& default_switch_value);
44 
46 
51  xtd::diagnostics::trace_level level() const;
55  void level(xtd::diagnostics::trace_level level);
56 
59  bool trace_error() const;
60 
63  bool trace_info() const;
64 
67  bool trace_verbose() const;
68 
71  bool trace_warning() const;
73 
74  protected:
76 
78  void on_switch_setting_changed() override;
79  void on_value_changed() override;
81  };
82  }
83 }
Contains xtd::diagnostics::debug class.
Provides a multilevel switch to control tracing and debug output without recompiling your code...
Definition: trace_switch.h:26
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:50
Contains xtd::diagnostics::switch_base class.
Provides an abstract base class to create new debugging and tracing switches.
Definition: switch_base.h:31
Contains xtd::diagnostics::trace_level enum class.
trace_level
Specifies what messages to output for the debug, trace and trace_switch classes.
Definition: trace_level.h:20