summaryrefslogtreecommitdiffhomepage
path: root/src/raylib.h
diff options
context:
space:
mode:
authorRay <[email protected]>2021-05-30 18:02:06 +0200
committerRay <[email protected]>2021-05-30 18:02:06 +0200
commit71995d52b36c86b09f064953fb3dd2d2fd60c704 (patch)
tree152651cd09fdecab36f3928222783d99fd1865d7 /src/raylib.h
parenta178a2170bb821fbee135c17fc166733caa19bda (diff)
downloadraylib-71995d52b36c86b09f064953fb3dd2d2fd60c704.tar.gz
raylib-71995d52b36c86b09f064953fb3dd2d2fd60c704.zip
REVIEWED: exit() on LOG_FATAL instead of LOG_ERROR #1796
Diffstat (limited to 'src/raylib.h')
-rw-r--r--src/raylib.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/raylib.h b/src/raylib.h
index d2a1685d..63d1bdf6 100644
--- a/src/raylib.h
+++ b/src/raylib.h
@@ -498,14 +498,15 @@ typedef enum {
} ConfigFlags;
// Trace log level
+// NOTE: Organized by priority level
typedef enum {
LOG_ALL = 0, // Display all logs
- LOG_TRACE,
- LOG_DEBUG,
- LOG_INFO,
- LOG_WARNING,
- LOG_ERROR,
- LOG_FATAL,
+ LOG_TRACE, // Trace logging, intended for internal use only
+ LOG_DEBUG, // Debug logging, used for internal debugging, it should be disabled on release builds
+ LOG_INFO, // Info logging, used for program execution info
+ LOG_WARNING, // Warning logging, used on recoverable failures
+ LOG_ERROR, // Error logging, used on unrecoverable failures
+ LOG_FATAL, // Fatal logging, used to abort program: exit(EXIT_FAILURE)
LOG_NONE // Disable logging
} TraceLogLevel;
@@ -1015,7 +1016,7 @@ RLAPI int GetRandomValue(int min, int max); // Returns a r
RLAPI void TakeScreenshot(const char *fileName); // Takes a screenshot of current screen (filename extension defines format)
RLAPI void SetConfigFlags(unsigned int flags); // Setup init configuration flags (view FLAGS)
-RLAPI void TraceLog(int logLevel, const char *text, ...); // Show trace log messages (LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERROR)
+RLAPI void TraceLog(int logLevel, const char *text, ...); // Show trace log messages (LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERROR...)
RLAPI void SetTraceLogLevel(int logLevel); // Set the current threshold (minimum) log level
RLAPI void *MemAlloc(int size); // Internal memory allocator
RLAPI void *MemRealloc(void *ptr, int size); // Internal memory reallocator