diff options
| author | Jason Maskell <[email protected]> | 2016-05-31 13:54:29 +0200 |
|---|---|---|
| committer | Jason Maskell <[email protected]> | 2016-05-31 13:54:29 +0200 |
| commit | 9d4bad02e6eb15ec5cf62681923543776d66e9f1 (patch) | |
| tree | 1f64f36d04a518a1369ce9e34ba30b0debea1b9f /include | |
| parent | Added support for RFC 104, the logging interface: https://docs.google.com/doc... (diff) | |
| download | waveworks_archive-9d4bad02e6eb15ec5cf62681923543776d66e9f1.tar.xz waveworks_archive-9d4bad02e6eb15ec5cf62681923543776d66e9f1.zip | |
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.
Diffstat (limited to 'include')
| -rw-r--r-- | include/GFSDK_Logger.h | 25 |
1 files changed, 25 insertions, 0 deletions
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; + }; +} + |