Typo fixes, readme updates
This commit is contained in:
parent
3971a5b662
commit
ceab08a26d
11 changed files with 80 additions and 39 deletions
|
@ -4,7 +4,7 @@
|
|||
#include <string_view>
|
||||
#include <algorithm>
|
||||
|
||||
constexpr std::array<std::string_view, static_cast<int>(Logger::Severity::_sevetirySize)> levels({
|
||||
constexpr std::array<std::string_view, static_cast<int>(Logger::Severity::_severitySize)> levels({
|
||||
"debug",
|
||||
"info",
|
||||
"minor",
|
||||
|
@ -46,8 +46,8 @@ void Logger::fatal(const std::string& comment, bool colored) const {
|
|||
|
||||
Logger::Severity Logger::stringToSeverity(const std::string& line) {
|
||||
unsigned char dist = std::distance(levels.begin(), std::find(levels.begin(), levels.end(), line));
|
||||
if (dist < static_cast<unsigned char>(Severity::_sevetirySize))
|
||||
if (dist < static_cast<unsigned char>(Severity::_severitySize))
|
||||
return static_cast<Severity>(dist);
|
||||
|
||||
return Severity::_sevetirySize;
|
||||
return Severity::_severitySize;
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ public:
|
|||
warning,
|
||||
error,
|
||||
fatal,
|
||||
_sevetirySize
|
||||
_severitySize
|
||||
};
|
||||
using Message = std::pair<Severity, std::string>;
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include <string_view>
|
||||
#include <iostream>
|
||||
|
||||
constexpr const std::array<std::string_view, static_cast<int>(Logger::Severity::_sevetirySize)> logSettings({
|
||||
constexpr const std::array<std::string_view, static_cast<int>(Logger::Severity::_severitySize)> logSettings({
|
||||
/*debug*/ "\e[90m",
|
||||
/*info*/ "\e[32m",
|
||||
/*minor*/ "\e[34m",
|
||||
|
@ -14,7 +14,7 @@ constexpr const std::array<std::string_view, static_cast<int>(Logger::Severity::
|
|||
/*fatal*/ "\e[91m"
|
||||
});
|
||||
|
||||
constexpr const std::array<std::string_view, static_cast<int>(Logger::Severity::_sevetirySize)> logHeaders({
|
||||
constexpr const std::array<std::string_view, static_cast<int>(Logger::Severity::_severitySize)> logHeaders({
|
||||
/*debug*/ "DEBUG: ",
|
||||
/*info*/ "INFO: ",
|
||||
/*minor*/ "MINOR: ",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue