New logger
This commit is contained in:
@@ -1,8 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
#include <format>
|
||||
#include <sophia/util/logger.hpp>
|
||||
#include <utility>
|
||||
|
||||
template <typename... Args>
|
||||
void log(Args... args) {
|
||||
sophia::log::print("\033[1;38;2;170;90;255m[editor]\033[0m", args...);
|
||||
void log(std::format_string<Args...> fmt, Args&&... args) {
|
||||
if constexpr (sophia::log::enabled) {
|
||||
sophia::log::print("\033[1;38;2;170;90;255m[editor]\033[0m {}",
|
||||
std::format(fmt, std::forward<Args>(args)...));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user