-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #447 from NikitaZotov/feat/improve_logger
[memory][utils][logger] Allow to create multiple loggers
- Loading branch information
Showing
23 changed files
with
901 additions
and
322 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
sc-memory/sc-memory/include/sc-memory/_template/utils/sc_log.tpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* This source file is part of an OSTIS project. For the latest info, see http://ostis.net | ||
* Distributed under the MIT License | ||
* (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT) | ||
*/ | ||
|
||
#include "sc-memory/utils/sc_logger.hpp" | ||
|
||
#include "sc-memory/utils/sc_message.hpp" | ||
|
||
namespace utils | ||
{ | ||
|
||
template <typename T, typename... ARGS> | ||
void ScLogger::Error(T const & t, ARGS const &... others) | ||
{ | ||
Message(ScLogLevel::Level::Error, utils::impl::Message(t, others...), ScConsole::Color::Red); | ||
} | ||
|
||
template <typename T, typename... ARGS> | ||
void ScLogger::Warning(T const & t, ARGS const &... others) | ||
{ | ||
Message(ScLogLevel::Level::Warning, utils::impl::Message(t, others...), ScConsole::Color::Yellow); | ||
} | ||
|
||
template <typename T, typename... ARGS> | ||
void ScLogger::Info(T const & t, ARGS const &... others) | ||
{ | ||
Message(ScLogLevel::Level::Info, utils::impl::Message(t, others...), ScConsole::Color::Grey); | ||
} | ||
|
||
template <typename T, typename... ARGS> | ||
void ScLogger::Debug(T const & t, ARGS const &... others) | ||
{ | ||
Message(ScLogLevel::Level::Debug, utils::impl::Message(t, others...), ScConsole::Color::LightBlue); | ||
} | ||
|
||
} // namespace utils |
Oops, something went wrong.