remove std::print, we c++20 now fuck it
This commit is contained in:
@@ -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 <chrono>
|
||||
#include <format>
|
||||
#include <iostream>
|
||||
#include <mutex>
|
||||
#include <print>
|
||||
#include <source_location>
|
||||
#include <string_view>
|
||||
|
||||
@@ -60,8 +63,8 @@ void log(const LOG level, const std::source_location& loc, std::format_string<Ar
|
||||
/* log to console */
|
||||
{
|
||||
std::scoped_lock lock(cmtx);
|
||||
std::print(pattern, color, pFname(loc.function_name()), reset);
|
||||
std::println(str, std::forward<Args>(args)...);
|
||||
std::cout << std::format(pattern, color, pFname(loc.function_name()), reset);
|
||||
std::cout << std::format(str, std::forward<Args>(args)...) << std::endl;
|
||||
}
|
||||
|
||||
#ifdef LOG_FILE_LOCATION
|
||||
|
||||
Reference in New Issue
Block a user