xtd - Reference Guide  0.1.1
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
trace_level.h
Go to the documentation of this file.
1 #pragma once
5 #include "../ustring.h"
6 
8 namespace xtd {
10  namespace diagnostics {
17  enum class trace_level {
19  off = 0,
21  error = 1,
23  warning = 2,
25  info = 3,
27  verbose = 4,
28  };
29 
30  inline std::ostream& operator<<(std::ostream& os, xtd::diagnostics::trace_level value) {return os << to_string(value, {{diagnostics::trace_level::off, "off"}, {diagnostics::trace_level::error, "error"}, {diagnostics::trace_level::warning, "warning"}, {diagnostics::trace_level::info, "info"}, {diagnostics::trace_level::verbose, "verbose"}});}
31  inline std::wostream& operator<<(std::wostream& os, xtd::diagnostics::trace_level value) {return os << to_string(value, {{diagnostics::trace_level::off, L"off"}, {diagnostics::trace_level::error, L"error"}, {diagnostics::trace_level::warning, L"warning"}, {diagnostics::trace_level::info, L"info"}, {diagnostics::trace_level::verbose, L"verbose"}});}
32  }
33 }
trace_level
Specifies what messages to output for the debug, trace and trace_switch classes.
Definition: trace_level.h:17
std::string to_string(const value_t &value, const std::string &fmt, const std::locale &loc)
Convert a specified value into a string with specified format and locale.
Definition: to_string.h:37
@ verbose
Output all debugging and tracing messages.
@ off
Output no tracing and debugging messages.
@ warning
Output warnings and error-handling messages.
@ info
Output informational messages, warnings, and error-handling messages.
@ error
Output error-handling messages.
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition: system_report.h:17