Simple-Log  alpha-v0.7
PresetTypes.hpp
Go to the documentation of this file.
1 // Copyright Dominic Koepke 2021 - 2021.
2 // Distributed under the Boost Software License, Version 1.0.
3 // (See accompanying file LICENSE_1_0.txt or copy at
4 // https://www.boost.org/LICENSE_1_0.txt)
5 
6 #ifndef SL_LOG_PRESET_TYPES_HPP
7 #define SL_LOG_PRESET_TYPES_HPP
8 
9 #pragma once
10 
11 #include "Simple-Log.hpp"
12 
13 namespace sl::log::preset
14 {
25  enum class SevLvl
26  {
27  debug,
28  info,
29  hint,
30  warning,
31  error,
32  fatal
33  };
34 
41  inline std::ostream& operator <<(std::ostream& out, SevLvl lvl)
42  {
43  constexpr const char* str[] = { "debug", "info", "hint", "warning", "error", "fatal" };
44  out << str[static_cast<std::size_t>(lvl)];
45  return out;
46  }
47 
81 
83 }
84 
85 #endif
Convenience class for generating Record s.
Definition: Logger.hpp:84
A collection of logging related information.
Definition: Record.hpp:227
Abstract Sink class which offers basic filtering, formatting functionality.
Definition: BasicSink.hpp:52
Sink class for directly logging onto std::cout.
Definition: ConsoleSink.hpp:239
The central point of the whole library. Needs to be instantiated at least once.
Definition: Core.hpp:51
Class for logging into files.
Definition: FileSink.hpp:81
Sink interface class.
Definition: ISink.hpp:29
An std::ostream orientated Sink class which extends BasicSink.
Definition: OStreamSink.hpp:35
SevLvl
A simple severity level enum type.
Definition: PresetTypes.hpp:26
std::ostream & operator<<(std::ostream &out, SevLvl lvl)
Operator << overload for SeverityLevel type.
Definition: PresetTypes.hpp:41
Definition: PresetTypes.hpp:14