summaryrefslogtreecommitdiff
path: root/hyprtester/src/Log.hpp
blob: 7eeb3ece099756f86ce4b8783f227c02c30f26a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#pragma once
#include <string>
#include <format>
#include <print>

namespace NLog {
    template <typename... Args>
    //NOLINTNEXTLINE
    void log(std::format_string<Args...> fmt, Args&&... args) {
        std::string logMsg = "";

        logMsg += std::vformat(fmt.get(), std::make_format_args(args...));

        std::println("{}", logMsg);
        std::fflush(stdout);
    }
}