From 50ba800cb9f8641d61522e283fa46858a34e004c Mon Sep 17 00:00:00 2001 From: Idir Aliane Crespo Date: Fri, 26 Jan 2024 21:42:21 +0100 Subject: [PATCH] Added GetTraceLogLevel function --- src/raylib.h | 1 + src/utils.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/raylib.h b/src/raylib.h index 4c4b191c0..b5b28d9dd 100644 --- a/src/raylib.h +++ b/src/raylib.h @@ -1086,6 +1086,7 @@ RLAPI void OpenURL(const char *url); // Open URL wi //------------------------------------------------------------------ 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 TraceLogLevel GetTraceLogLevel(); // Get the current threshold (minimum) log level RLAPI void *MemAlloc(unsigned int size); // Internal memory allocator RLAPI void *MemRealloc(void *ptr, unsigned int size); // Internal memory reallocator RLAPI void MemFree(void *ptr); // Internal memory free diff --git a/src/utils.c b/src/utils.c index 987021c73..879f25cde 100644 --- a/src/utils.c +++ b/src/utils.c @@ -102,6 +102,9 @@ static int android_close(void *cookie); // Set the current threshold (minimum) log level void SetTraceLogLevel(int logType) { logTypeLevel = logType; } +// Get the current threshold (minimum) log level +TraceLogLevel GetTraceLogLevel() { return logTypeLevel; } + // Show trace log messages (LOG_INFO, LOG_WARNING, LOG_ERROR, LOG_DEBUG) void TraceLog(int logType, const char *text, ...) {