diff options
| author | Ray <raysan5@gmail.com> | 2019-01-21 10:09:51 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-21 10:09:51 +0100 |
| commit | 9b97cf6972c1ffb456a3831916a7afe74cfa458e (patch) | |
| tree | bedfe6cda85824529973d2c1cfa79ae286ed3ddc /src/raylib.h | |
| parent | 734999301589cf007bbd974aba19e5774cc39c3c (diff) | |
| parent | 343fef4aa4532e21bd74ed84e0339756eb5ab897 (diff) | |
| download | raylib-9b97cf6972c1ffb456a3831916a7afe74cfa458e.tar.gz raylib-9b97cf6972c1ffb456a3831916a7afe74cfa458e.zip | |
Merge pull request #731 from MarcoLizza/reorganizing-logging
Reorganizing logging
Diffstat (limited to 'src/raylib.h')
| -rw-r--r-- | src/raylib.h | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/raylib.h b/src/raylib.h index 85b88b85..11fe145b 100644 --- a/src/raylib.h +++ b/src/raylib.h @@ -422,13 +422,15 @@ typedef enum { } ConfigFlag; // Trace log type -// NOTE: Used for bit masks typedef enum { - LOG_INFO = 1, - LOG_WARNING = 2, - LOG_ERROR = 4, - LOG_DEBUG = 8, - LOG_OTHER = 16 + LOG_ALL, // Display all logs + LOG_TRACE, + LOG_DEBUG, + LOG_INFO, + LOG_WARNING, + LOG_ERROR, + LOG_FATAL, + LOG_NONE // Disable logging } TraceLogType; // Keyboard keys @@ -818,7 +820,7 @@ typedef enum { } NPatchType; // Callbacks to be implemented by users -typedef void (*TraceLogCallback)(int msgType, const char *text, va_list args); +typedef void (*TraceLogCallback)(int logType, const char *text, va_list args); #if defined(__cplusplus) extern "C" { // Prevents name mangling of functions @@ -898,9 +900,10 @@ RLAPI Color Fade(Color color, float alpha); // Color fade- // Misc. functions RLAPI void SetConfigFlags(unsigned char flags); // Setup window configuration flags (view FLAGS) -RLAPI void SetTraceLog(unsigned char types); // Enable trace log message types (bit flags based) +RLAPI void SetTraceLogLevel(int logType); // Set the current threshold (minimum) log level. +RLAPI void SetTraceLogExit(int logType); // Set the exit threshold (minimum) log level. RLAPI void SetTraceLogCallback(TraceLogCallback callback); // Set a trace log callback to enable custom logging bypassing raylib's one -RLAPI void TraceLog(int logType, const char *text, ...); // Show trace log messages (LOG_INFO, LOG_WARNING, LOG_ERROR, LOG_DEBUG) +RLAPI void TraceLog(int logType, const char *text, ...); // Show trace log messages (LOG_INFO, LOG_WARNING, LOG_ERROR, LOG_DEBUG) RLAPI void TakeScreenshot(const char *fileName); // Takes a screenshot of current screen (saved a .png) RLAPI int GetRandomValue(int min, int max); // Returns a random value between min and max (both included) |
