From 9d4bad02e6eb15ec5cf62681923543776d66e9f1 Mon Sep 17 00:00:00 2001 From: Jason Maskell Date: Tue, 31 May 2016 13:54:29 +0200 Subject: Renamed Logger.h to GFSDK_Logger.h since it's a shared header. Removed the narrow char methods. Removed the floating log functions. Changed the ILogger::log() method to use varargs and printf() formatting. --- include/GFSDK_Logger.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 include/GFSDK_Logger.h (limited to 'include/GFSDK_Logger.h') diff --git a/include/GFSDK_Logger.h b/include/GFSDK_Logger.h new file mode 100644 index 0000000..5ad6d77 --- /dev/null +++ b/include/GFSDK_Logger.h @@ -0,0 +1,25 @@ +#pragma once + +namespace nv +{ + enum struct LogSeverity + { + kInfo = 0, // Message contains information about normal and expected behavior + kWarning = 1, // Message contains information about a potentially problematic situation + kError = 2, // Message contains information about a problem + kFatal = 3 // Message contains information about a fatal problem; program should be aborted + }; + + static const char * LogSeverityStrings[] = { "INFO", "WARNING", "ERROR", "FATAL" }; + + + // Note: Implementation of this interface must be thread-safe + class ILogger + { + public: + // ‘filename’ is NULL and ‘linenumber’ is 0 in release builds of GameWorks +// virtual void log(LogSeverity severity, const char* filename, int linenumber, const char* text, ...) = 0; + virtual void log(LogSeverity severity, const wchar_t* filename, int linenumber, const wchar_t* text, ...) = 0; + }; +} + -- cgit v1.2.3