SBgl 0.1.0
A graphics framework in C99
Loading...
Searching...
No Matches
sbgl_internal_log.h
Go to the documentation of this file.
1#ifndef SBGL_INTERNAL_LOG
2#define SBGL_INTERNAL_LOG
3
4#include <stdbool.h>
5#include <stdint.h>
6#include <stddef.h>
7
18
30
34typedef struct {
36 uint32_t categoryMask;
38 const char* filePath;
39 uint32_t maxFiles;
42
44 sbgl_LogLevel level,
45 sbgl_LogCategory category,
46 const char* file,
47 int line,
48 const char* function,
49 const char* message
50);
51
52#define sbgl_log_impl(level, category, msg) \
53 sbgl_internal_log_impl(level, category, __FILE__, __LINE__, __func__, msg)
54
55void sbgl_LogSetLevel(sbgl_LogLevel minLevel);
56void sbgl_LogSetOutput(const char* path);
57void sbgl_LogSetFileRotation(uint32_t maxFiles, size_t maxSize);
58const char* sbgl_ResultToString(int result);
59const char* sbgl_VkResultToString(int32_t vkResult);
60
61#endif // !SBGL_INTERNAL_LOG
void sbgl_LogSetOutput(const char *path)
Definition sbgl_log.c:171
sbgl_LogCategory
Logging categories for component filtering.
@ SBGL_LOG_CAT_PLATFORM
@ SBGL_LOG_CAT_INPUT
@ SBGL_LOG_CAT_COUNT
@ SBGL_LOG_CAT_GFX
@ SBGL_LOG_CAT_CORE
@ SBGL_LOG_CAT_VOXEL
sbgl_LogLevel
Logging severity levels.
@ SBGL_LOG_CRITICAL
@ SBGL_LOG_WARN
@ SBGL_LOG_ERROR
@ SBGL_LOG_INFO
@ SBGL_LOG_DEBUG
void sbgl_LogSetFileRotation(uint32_t maxFiles, size_t maxSize)
Definition sbgl_log.c:186
void sbgl_internal_log_impl(sbgl_LogLevel level, sbgl_LogCategory category, const char *file, int line, const char *function, const char *message)
Definition sbgl_log.c:116
const char * sbgl_ResultToString(int result)
Definition sbgl_log.c:191
void sbgl_LogSetLevel(sbgl_LogLevel minLevel)
Definition sbgl_log.c:167
const char * sbgl_VkResultToString(int32_t vkResult)
Definition sbgl_log.c:198
Logging configuration.
const char * filePath
sbgl_LogLevel minLevel