mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-12 14:28:15 +00:00
Merge pull request #731 from MarcoLizza/reorganizing-logging
Reorganizing logging
This commit is contained in:
21
src/raylib.h
21
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)
|
||||
|
||||
|
Reference in New Issue
Block a user