#include "../../include/vae/vae.hpp"
#include <stdio.h>
#include "../wrapped/vae_profiler.hpp"
#include <stdarg.h>
#include <cstring>
#include "../../external/headeronly/stb_sprintf.h"
Go to the source code of this file.
|
#define | STB_SPRINTF_IMPLEMENTATION |
|
#define | VAE_ERROR(msg, ...) vae_print_path(vae::LogLevel::Error, __FILE__, __LINE__, msg, ## __VA_ARGS__); |
|
#define | VAE_DEBUG(msg, ...) vae_print_path(vae::LogLevel::Debug, __FILE__, __LINE__, msg, ## __VA_ARGS__); |
|
#define | VAE_INFO(msg, ...) vae_print_path(vae::LogLevel::Info, __FILE__, __LINE__, msg, ## __VA_ARGS__); |
|
#define | VAE_WARN(msg, ...) vae_print_path(vae::LogLevel::Warn, __FILE__, __LINE__, msg, ## __VA_ARGS__); |
|
#define | VAE_DEBUG_VOICES(msg, ...) |
|
#define | VAE_DEBUG_EVENT(msg, ...) |
|
◆ STB_SPRINTF_IMPLEMENTATION
#define STB_SPRINTF_IMPLEMENTATION |
◆ VAE_DEBUG
◆ VAE_DEBUG_EVENT
#define VAE_DEBUG_EVENT |
( |
|
msg, |
|
|
|
... |
|
) |
| |
◆ VAE_DEBUG_VOICES
#define VAE_DEBUG_VOICES |
( |
|
msg, |
|
|
|
... |
|
) |
| |
◆ VAE_ERROR
◆ VAE_INFO
◆ VAE_WARN
◆ vae_print()
◆ vae_print_path()
void vae_print_path |
( |
vae::LogLevel |
level, |
|
|
const char * |
path, |
|
|
int |
line, |
|
|
const char * |
format, |
|
|
|
... |
|
) |
| |
Definition at line 44 of file vae_logger.hpp.
45 if (path ==
nullptr) {
return; }
46 if (format ==
nullptr) {
return; }
48 constexpr int bufferSize = 1024;
49 constexpr int fixedPathLength = 16;
50 static bool locked =
false;
51 static char buffer[bufferSize];
54 int pathLength = strlen(path);
55 if (fixedPathLength < pathLength) {
56 path += (pathLength - fixedPathLength);
63 case vae::LogLevel::Debug: stbsp_snprintf(buffer, bufferSize,
"DEBUG | %s:%i \t| %s", path, line, format);
break;
64 case vae::LogLevel::Info: stbsp_snprintf(buffer, bufferSize,
" INFO | %s:%i \t| %s", path, line, format);
break;
65 case vae::LogLevel::Warn: stbsp_snprintf(buffer, bufferSize,
" WARN | %s:%i \t| %s", path, line, format);
break;
66 case vae::LogLevel::Error: stbsp_snprintf(buffer, bufferSize,
"ERROR | %s:%i \t| %s", path, line, format);
break;
67 case vae::LogLevel::Ciritical: stbsp_snprintf(buffer, bufferSize,
" CRIT | %s:%i \t| %s", path, line, format);
break;
void vae_print_va(vae::LogLevel level, const char *format, va_list va)
◆ vae_print_va()
void vae_print_va |
( |
vae::LogLevel |
level, |
|
|
const char * |
format, |
|
|
va_list |
va |
|
) |
| |
Definition at line 31 of file vae_logger.hpp.
32 constexpr int bufferSize = 1024;
33 static bool locked =
false;
34 static char buffer[bufferSize];
37 const int length = stbsp_vsnprintf(buffer, bufferSize, format, va);
38 buffer[bufferSize - 1] =
'\0';
void vae_print(vae::LogLevel level, const char *message)
#define VAE_PROFILER_MESSAGE(msg, size)
Send dynamic string message.