LibTMJ  1.0.0
A library for loading JSON Tiled maps
Macros | Functions | Variables
log.c File Reference
#include <stdarg.h>
#include <stdbool.h>
#include <stdio.h>
#include "../include/tmj.h"
Include dependency graph for log.c:

Go to the source code of this file.

Macros

#define LOGMSG_BUFSIZE   1024
 

Functions

void tmj_log_regcb (bool debug, void(*callback)(tmj_log_priority, const char *))
 Registers a callback function to handle logging events. More...
 
void logmsg (tmj_log_priority priority, char *msg,...)
 Processes log messages and passes them to the active logging callback, if there is one. More...
 

Variables

bool log_debug = false
 
void(* log_callback )(tmj_log_priority, const char *) = NULL
 
char logmsg_buf [LOGMSG_BUFSIZE]
 Statically-allocated memory to hold log messages which are passed to the logging callback. More...
 

Macro Definition Documentation

◆ LOGMSG_BUFSIZE

#define LOGMSG_BUFSIZE   1024

Definition at line 11 of file log.c.

Variable Documentation

◆ log_debug

bool log_debug = false

Definition at line 13 of file log.c.

◆ log_callback

void(* log_callback) (tmj_log_priority, const char *) ( tmj_log_priority  ,
const char *   
) = NULL

Definition at line 14 of file log.c.