mirror of
https://github.com/es3n1n/defendnot.git
synced 2026-08-02 10:32:01 +00:00
initial
This commit is contained in:
19
defendnot/core/log.hpp
Normal file
19
defendnot/core/log.hpp
Normal file
@@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
#include "shared/ctx.hpp"
|
||||
#include "shared/util.hpp"
|
||||
#include <print>
|
||||
#include <thread>
|
||||
|
||||
#include <Windows.h>
|
||||
|
||||
namespace defendnot {
|
||||
template <typename... TArgs>
|
||||
void logln(const std::format_string<TArgs...> fmt, TArgs... args) noexcept {
|
||||
if (!shared::ctx.verbose) [[likely]] {
|
||||
return;
|
||||
}
|
||||
|
||||
shared::alloc_console();
|
||||
std::println(stdout, fmt, std::forward<TArgs>(args)...);
|
||||
}
|
||||
} // namespace defendnot
|
||||
Reference in New Issue
Block a user