integrating software renderer
[retroray] / src / logger.h
1 /*
2 RetroRay - integrated standalone vintage modeller/renderer
3 Copyright (C) 2023  John Tsiombikas <nuclear@mutantstargoat.com>
4
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program.  If not, see <https://www.gnu.org/licenses/>.
17 */
18 #ifndef LOGGER_H_
19 #define LOGGER_H_
20
21 #include <stdio.h>
22 #include <stdarg.h>
23
24 void init_logger(void);
25 void cleanup_logger(void);
26
27 int add_log_file(const char *fname);
28 int add_log_stream(FILE *fp);
29 int add_log_console(const char *devname);
30 int add_log_callback(void (*cbfunc)(const char*, void*), void *cls);
31
32 void errormsg(const char *fmt, ...);
33 void warnmsg(const char *fmt, ...);
34 void infomsg(const char *fmt, ...);
35 void dbgmsg(const char *fmt, ...);
36
37 void verrormsg(const char *fmt, va_list ap);
38 void vwarnmsg(const char *fmt, va_list ap);
39 void vinfomsg(const char *fmt, va_list ap);
40 void vdbgmsg(const char *fmt, va_list ap);
41
42 #endif  /* LOGGER_H_ */