7#include "Common/Logging.hpp"
9namespace Grindstone::Events {
15 std::ofstream outputStream;
27 LogSeverity logSeverity,
29 LogInternalType internalType,
35 template<
typename... Args>
37 LogSeverity logSeverity,
39 LogInternalType internalType,
45 std::string formattedString = fmt::format(fmt, args...);
46 Print(logSeverity, logSource, internalType, filename, line, formattedString.c_str());
50#define GPRINT_TYPED(severity, source, internalType, str) Grindstone::Logger::Print(severity, source, internalType, __FILE__, __LINE__, str)
51#define GPRINT_TYPED_INFO(source, internalType, str) Grindstone::Logger::Print(Grindstone::LogSeverity::Info, source, internalType, __FILE__, __LINE__, str)
52#define GPRINT_TYPED_TRACE(source, internalType, str) Grindstone::Logger::Print(Grindstone::LogSeverity::Trace, source, internalType, __FILE__, __LINE__, str)
53#define GPRINT_TYPED_WARN(source, internalType, str) Grindstone::Logger::Print(Grindstone::LogSeverity::Warning, source, internalType, __FILE__, __LINE__, str)
54#define GPRINT_TYPED_ERROR(source, internalType, str) Grindstone::Logger::Print(Grindstone::LogSeverity::Error, source, internalType, __FILE__, __LINE__, str)
55#define GPRINT_TYPED_FATAL(source, internalType, str) Grindstone::Logger::Print(Grindstone::LogSeverity::Fatal, source, internalType, __FILE__, __LINE__, str)
57#define GPRINT(severity, source, str) Grindstone::Logger::Print(severity, source, Grindstone::LOG_UNSPECIFIED_INTERNAL_TYPE, __FILE__, __LINE__, str)
58#define GPRINT_INFO(source, str) Grindstone::Logger::Print(Grindstone::LogSeverity::Info, source, Grindstone::LOG_UNSPECIFIED_INTERNAL_TYPE, __FILE__, __LINE__, str)
59#define GPRINT_TRACE(source, str) Grindstone::Logger::Print(Grindstone::LogSeverity::Trace, source, Grindstone::LOG_UNSPECIFIED_INTERNAL_TYPE, __FILE__, __LINE__, str)
60#define GPRINT_WARN(source, str) Grindstone::Logger::Print(Grindstone::LogSeverity::Warning, source, Grindstone::LOG_UNSPECIFIED_INTERNAL_TYPE, __FILE__, __LINE__, str)
61#define GPRINT_ERROR(source, str) Grindstone::Logger::Print(Grindstone::LogSeverity::Error, source, Grindstone::LOG_UNSPECIFIED_INTERNAL_TYPE, __FILE__, __LINE__, str)
62#define GPRINT_FATAL(source, str) Grindstone::Logger::Print(Grindstone::LogSeverity::Fatal, source, LOG_UNSPECIFIED_INTERNAL_TYPE, __FILE__, __LINE__, str)
64#define GPRINT_TYPED_V(severity, source, internalType, fmt, ...) Grindstone::Logger::Print(severity, source, internalType, __FILE__, __LINE__, fmt, __VA_ARGS__)
65#define GPRINT_TYPED_INFO_V(source, internalType, fmt, ...) Grindstone::Logger::Print(Grindstone::LogSeverity::Info, source, internalType, __FILE__, __LINE__, fmt, __VA_ARGS__)
66#define GPRINT_TYPED_TRACE_V(source, internalType, fmt, ...) Grindstone::Logger::Print(Grindstone::LogSeverity::Trace, source, internalType, __FILE__, __LINE__, fmt, __VA_ARGS__)
67#define GPRINT_TYPED_WARN_V(source, internalType, fmt, ...) Grindstone::Logger::Print(Grindstone::LogSeverity::Warning, source, internalType, __FILE__, __LINE__, fmt, __VA_ARGS__)
68#define GPRINT_TYPED_ERROR_V(source, internalType, fmt, ...) Grindstone::Logger::Print(Grindstone::LogSeverity::Error, source, internalType, __FILE__, __LINE__, fmt, __VA_ARGS__)
69#define GPRINT_TYPED_FATAL_V(source, internalType, fmt, ...) Grindstone::Logger::Print(Grindstone::LogSeverity::Fatal, source, internalType, __FILE__, __LINE__, fmt, __VA_ARGS__)
71#define GPRINT_V(severity, source, fmt, ...) Grindstone::Logger::Print(severity, source, Grindstone::LOG_UNSPECIFIED_INTERNAL_TYPE, __FILE__, __LINE__, fmt, __VA_ARGS__)
72#define GPRINT_INFO_V(source, fmt, ...) Grindstone::Logger::Print(Grindstone::LogSeverity::Info, source, Grindstone::LOG_UNSPECIFIED_INTERNAL_TYPE, __FILE__, __LINE__, fmt, __VA_ARGS__)
73#define GPRINT_TRACE_V(source, fmt, ...) Grindstone::Logger::Print(Grindstone::LogSeverity::Trace, source, Grindstone::LOG_UNSPECIFIED_INTERNAL_TYPE, __FILE__, __LINE__, fmt, __VA_ARGS__)
74#define GPRINT_WARN_V(source, fmt, ...) Grindstone::Logger::Print(Grindstone::LogSeverity::Warning, source, Grindstone::LOG_UNSPECIFIED_INTERNAL_TYPE, __FILE__, __LINE__, fmt, __VA_ARGS__)
75#define GPRINT_ERROR_V(source, fmt, ...) Grindstone::Logger::Print(Grindstone::LogSeverity::Error, source, Grindstone::LOG_UNSPECIFIED_INTERNAL_TYPE, __FILE__, __LINE__, fmt, __VA_ARGS__)
76#define GPRINT_FATAL_V(source, fmt, ...) Grindstone::Logger::Print(Grindstone::LogSeverity::Fatal, source, LOG_UNSPECIFIED_INTERNAL_TYPE, __FILE__, __LINE__, fmt, __VA_ARGS__)
Definition Dispatcher.hpp:14