Go to the source code of this file.
◆ EMBER_TIMER_END
#define EMBER_TIMER_END |
( |
|
description | ) |
|
Value: do { \
auto end = std::chrono::high_resolution_clock::now(); \
auto duration = std::chrono::duration_cast<std::chrono::microseconds>(end - start).count(); \
LOG_INFO("%s took %lld (us), %.2f (ms)", description, duration, (float) duration / 1000.f); \
} while (0)
Timer macro end.
- Version
- 0.0.4
- Returns
- the messsage with the duration in ms
◆ EMBER_TIMER_START
#define EMBER_TIMER_START |
( |
| ) |
auto start = std::chrono::high_resolution_clock::now(); |
Timer macro.
- Version
- 0.0.4
◆ GL_ERROR
Value: { \
unsigned int error = glGetError(); \
if (error != GL_NO_ERROR) { \
LOG_ERROR("API ERROR_CODE: %d", error); \
} \
}
OpenGL error debug macro (for development)
- Version
- 0.0.1
- Returns
- just print the message
◆ LOG_CRITICAL
#define LOG_CRITICAL |
( |
|
... | ) |
|
Value: do { \
char buffer[1024]; \
SDL_LogCritical(SDL_LOG_CATEGORY_APPLICATION,
"%s", buffer);
\
} while (0)
void Push(const std::string &formatted_log)
Definition: logging.cpp:19
static Logger & Get()
Definition: logging.h:28
#define TRACE_FILE_LOG
Definition: logging.h:7
CRITICAL logging.
- Version
- 0.0.1
- Parameters
-
string | c-string with printf format specifier |
- Returns
- just print the message
◆ LOG_DEBUG
Value: do { \
char buffer[1024]; \
SDL_LogDebug(SDL_LOG_CATEGORY_APPLICATION,
"%s", buffer);
\
} while (0)
DEBUG logging.
- Version
- 0.0.1
- Parameters
-
string | c-string with printf format specifier |
- Returns
- just print the message
◆ LOG_ERROR
Value: do { \
char buffer[1024]; \
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,
"%s", buffer);
\
} while (0)
ERROR logging.
- Version
- 0.0.1
- Parameters
-
string | c-string with printf format specifier |
- Returns
- just print the message
◆ LOG_INFO
Value: do { \
char buffer[1024]; \
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
"%s", buffer);
\
} while (0)
INFO logging.
- Version
- 0.0.1
- Parameters
-
string | c-string with printf format specifier |
- Returns
- just print the message
◆ LOG_QUIT_ON_FAIL
#define LOG_QUIT_ON_FAIL |
( |
|
x | ) |
|
Value: if (!x) { \
LOG_ERROR("%s", SDL_GetError()); \
return SDL_APP_FAILURE; \
}
If fail the app will quit.
- Version
- 0.0.1
- Parameters
-
string | c-string with printf format specifier |
- Returns
- just print the message
◆ LOG_TRACE
Value: do { \
char buffer[1024]; \
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
"%s", buffer);
\
} while (0)
TRACING logging.
- Version
- 0.0.1
- Parameters
-
string | c-string with printf format specifier |
- Returns
- just print the message
◆ LOG_VERBOSE
#define LOG_VERBOSE |
( |
|
... | ) |
|
Value: do { \
char buffer[1024]; \
SDL_LogVerbose(SDL_LOG_CATEGORY_APPLICATION,
"%s", buffer);
\
} while (0)
VERBOSE logging.
- Version
- 0.0.1
- Parameters
-
string | c-string with printf format specifier |
- Returns
- just print the message
◆ LOG_WARN
Value: do { \
char buffer[1024]; \
SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION,
"%s", buffer);
\
} while (0)
WARNING logging.
- Version
- 0.0.1
- Parameters
-
string | c-string with printf format specifier |
- Returns
- just print the message
◆ STRINGIFY
#define STRINGIFY |
( |
|
x | ) |
#x |
◆ TO_STRING
◆ TRACE_FILE_LOG
#define TRACE_FILE_LOG "[" __TIME__ "]" "[EMBER_ENGINE - " __FILE__ ":" TO_STRING(__LINE__)"] - " |