mirror of
https://github.com/yuzu-mirror/yuzu.git
synced 2024-11-13 00:49:58 +00:00
3b558eebee
Add a new set of logging macros based on fmtlib Similar but not exactly the same as https://github.com/citra-emu/citra/pull/3533 Citra currently uses a different version of fmt, which does not support FMT_VARIADIC so make_args is used instead. On the other hand, yuzu uses fmt 4.1.0 which doesn't have make_args yet so FMT_VARIADIC is used.
20 lines
543 B
C++
20 lines
543 B
C++
// Copyright 2014 Citra Emulator Project
|
|
// Licensed under GPLv2 or any later version
|
|
// Refer to the license.txt file included.
|
|
|
|
#pragma once
|
|
|
|
#include <cstddef>
|
|
|
|
namespace Log {
|
|
|
|
struct Entry;
|
|
|
|
/// Formats a log entry into the provided text buffer.
|
|
std::string FormatLogMessage(const Entry& entry);
|
|
/// Formats and prints a log entry to stderr.
|
|
void PrintMessage(const Entry& entry);
|
|
/// Prints the same message as `PrintMessage`, but colored acoording to the severity level.
|
|
void PrintColoredMessage(const Entry& entry);
|
|
} // namespace Log
|