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
18
FILE* gf_log_default = NULL;
19
20
void
gf_log(
gf_engine_t
* engine,
const
char
* fmt, ...) {
21
va_list va;
22
FILE* out = gf_log_default;
23
if
(engine != NULL) {
24
out = engine->
log
;
25
}
26
if
(out != NULL) {
27
va_start(va, fmt);
28
vfprintf(out, fmt, va);
29
va_end(va);
30
}
31
}
gf_core.h
Core.
gf_log.h
Logger.
gf_pre.h
Required headers before anything.
gf_engine_t
Engine instance.
Definition
core.h:46
gf_engine_t::log
FILE * log
Log output.
Definition
core.h:46
src
gf_log.c
Generated by
1.9.8