GoldFish Engine
Quite simple and lightweight game engine
Loading...
Searching...
No Matches
gf_log.c
1#define GF_EXPOSE_CORE
2
3#include <gf_pre.h>
4
5/* External library */
6
7/* Interface */
8#include <gf_log.h>
9
10/* Engine */
11#include <gf_core.h>
12
13/* Standard */
14#include <stdio.h>
15#include <stdarg.h>
16#include <stddef.h>
17
18void gf_log(gf_engine_t* engine, const char* fmt, ...) {
19 va_list va;
20 FILE* out = stderr;
21 if(engine != NULL) {
22 out = engine->log;
23 }
24 if(out != NULL) {
25 va_start(va, fmt);
26 vfprintf(out, fmt, va);
27 va_end(va);
28 }
29}
Logger.
Required headers before anything.
Engine instance.
Definition core.h:44
FILE * log
Log output.
Definition core.h:44