#include <logger.h>
|
| logger (const std::string &Name="") |
|
template<typename... Targs> |
void | Info (std::string_view Format, Targs &&... Args) const |
|
template<typename... Targs> |
void | Success (std::string_view Format, Targs &&... Args) const |
|
template<typename... Targs> |
void | Warn (std::string_view Format, Targs &&... Args) const |
|
template<typename... Targs> |
void | Error (std::string_view Format, Targs &&... Args) const |
|
void | SetStream (std::ostream OutStream) |
|
Logger class.
Definition at line 19 of file logger.h.
◆ logger()
scl::logger::logger |
( |
const std::string & |
Name = "" | ) |
|
- Logger default constructor.
- Parameters
-
Name | - name of logger to be displayed at records. |
Definition at line 12 of file logger.cpp.
◆ Error()
template<typename... Targs>
void scl::logger::Error |
( |
std::string_view |
Format, |
|
|
Targs &&... |
Args |
|
) |
| const |
|
inline |
- Log error message to current out stream.
- Parameters
-
- Returns
- None.
Definition at line 90 of file logger.h.
91 {
92 Out <<
95 std::vformat(Format, std::make_format_args(Args...)) <<
97 }
const std::string color_literal_reset()
std::string color_literal(color ForegroundColor)
const std::string CurrentTime()
◆ Info()
template<typename... Targs>
void scl::logger::Info |
( |
std::string_view |
Format, |
|
|
Targs &&... |
Args |
|
) |
| const |
|
inline |
Events logging methods.
- Log info message to current out stream.
- Parameters
-
- Returns
- None.
Definition at line 43 of file logger.h.
44 {
45 Out <<
47 std::vformat(Format, std::make_format_args(Args...)) <<
48 '\n';
49 }
◆ SetStream()
void scl::logger::SetStream |
( |
std::ostream |
OutStream | ) |
|
- Set currently using out stream.
- Parameters
-
OutStream | - new stream to log in. |
- Returns
- None.
Definition at line 15 of file logger.cpp.
◆ Success()
template<typename... Targs>
void scl::logger::Success |
( |
std::string_view |
Format, |
|
|
Targs &&... |
Args |
|
) |
| const |
|
inline |
- Log success message to current out stream.
- Parameters
-
- Returns
- None.
Definition at line 58 of file logger.h.
59 {
60 Out <<
63 std::vformat(Format, std::make_format_args(Args...)) <<
65 }
◆ Warn()
template<typename... Targs>
void scl::logger::Warn |
( |
std::string_view |
Format, |
|
|
Targs &&... |
Args |
|
) |
| const |
|
inline |
- Log warn message to current out stream.
- Parameters
-
- Returns
- None.
Definition at line 74 of file logger.h.
75 {
76 Out <<
79 std::vformat(Format, std::make_format_args(Args...)) <<
81 }
The documentation for this class was generated from the following files: