diff --git a/logger.hpp b/logger.hpp index 629b7ae..f048f63 100644 --- a/logger.hpp +++ b/logger.hpp @@ -74,10 +74,10 @@ namespace sc { } -#define _debug(logger, ...) logger.msg(sc::loglevel::debug, __FILE__, __LINE__, __FUNCTION__, __VA_ARGS__) -#define _info(logger, ...) logger.msg(sc::loglevel::info, __FILE__, __LINE__, __FUNCTION__, __VA_ARGS__) -#define _warning(logger, ...) logger.msg(sc::loglevel::warning, __FILE__, __LINE__, __FUNCTION__, __VA_ARGS__) -#define _error(logger, ...) logger.msg(sc::loglevel::error, __FILE__, __LINE__, __FUNCTION__, __VA_ARGS__) -#define _critical(logger, ...) logger.msg(sc::loglevel::critical, __FILE__, __LINE__, __FUNCTION__, __VA_ARGS__) +#define SCDebug(logger, ...) logger.msg(sc::loglevel::debug, __FILE__, __LINE__, __FUNCTION__, __VA_ARGS__) +#define SCInfo(logger, ...) logger.msg(sc::loglevel::info, __FILE__, __LINE__, __FUNCTION__, __VA_ARGS__) +#define SCWarning(logger, ...) logger.msg(sc::loglevel::warning, __FILE__, __LINE__, __FUNCTION__, __VA_ARGS__) +#define SCError(logger, ...) logger.msg(sc::loglevel::error, __FILE__, __LINE__, __FUNCTION__, __VA_ARGS__) +#define SCCritical(logger, ...) logger.msg(sc::loglevel::critical, __FILE__, __LINE__, __FUNCTION__, __VA_ARGS__) #endif // _logger_H_ diff --git a/tester/main.cpp b/tester/main.cpp index caf891c..1fd2bf3 100644 --- a/tester/main.cpp +++ b/tester/main.cpp @@ -60,12 +60,12 @@ int main(int argc, const char * argv[]) { } std::cout << "hello, tester\n"; sc::logger logger("tester", sc::loglevel::debug); - _debug(logger, "efkes proberen"); - _info(logger, 42, " = ", 6, " x ", 7); - _warning(logger, "laatste waarschuwing"); - _error(logger, "foutje, bedankt"); - _critical(logger, "meltdown imminent"); - _info(logger, ""); + SCDebug(logger, "efkes proberen"); + SCInfo(logger, 42, " = ", 6, " x ", 7); + SCWarning(logger, "laatste waarschuwing"); + SCError(logger, "foutje, bedankt"); + SCCritical(logger, "meltdown imminent"); + SCInfo(logger, ""); } catch (const std::exception& ex) { std::cerr << "tester: " << ex.what() << '\n'; return EXIT_FAILURE;