diff --git a/include/log.hpp b/include/log.hpp index 4ef2a68..72e830f 100644 --- a/include/log.hpp +++ b/include/log.hpp @@ -2,15 +2,18 @@ #define LOG_HPP // comment out to disable logging in general + #define applog(level, fmt, ...) utils::log(level, std::source_location::current(), fmt, ##__VA_ARGS__) + // comment out to disable logging to file // #define LOG_FILE_LOCATION "linuxSmartie.log.gz" #ifdef applog #include +#include +#include #include -#include #include #include @@ -60,8 +63,8 @@ void log(const LOG level, const std::source_location& loc, std::format_string(args)...); + std::cout << std::format(pattern, color, pFname(loc.function_name()), reset); + std::cout << std::format(str, std::forward(args)...) << std::endl; } #ifdef LOG_FILE_LOCATION