Oyster Harvest Area Closure Analysis 0.1
Prediction and analysis of NSW oyster harvest area closures.
Loading...
Searching...
No Matches
log.c File Reference
#include "log.h"
Include dependency graph for log.c:

Data Structures

struct  Log_Callback
 

Macros

#define MAX_CALLBACKS   32
 

Functions

static void stdout_callback (Log_Event *ev)
 
static void file_callback (Log_Event *ev)
 
static void unlock (void)
 
const char * log_level_string (int level)
 
void log_set_lock (log_LockFn fn, void *udata)
 
void log_set_level (int level)
 
void log_set_quiet (bool enable)
 
int log_add_callback (log_LogFn fn, void *udata, int level)
 
int log_add_fp (FILE *fp, int level)
 
static void init_event (Log_Event *ev, void *udata)
 
void log_log (int level, const char *file, int line, const char *fmt,...)
 

Variables

struct {
   void *   udata
 
   log_LockFn   lock
 
   int   level
 
   bool   quiet
 
   Log_Callback   callbacks [MAX_CALLBACKS]
 
L
 
static const char * level_strings []
 

Macro Definition Documentation

◆ MAX_CALLBACKS

#define MAX_CALLBACKS   32

Function Documentation

◆ file_callback()

static void file_callback ( Log_Event ev)
static

◆ init_event()

static void init_event ( Log_Event ev,
void *  udata 
)
static

◆ log_add_callback()

int log_add_callback ( log_LogFn  fn,
void *  udata,
int  level 
)

◆ log_add_fp()

int log_add_fp ( FILE *  fp,
int  level 
)

◆ log_level_string()

const char * log_level_string ( int  level)

◆ log_log()

void log_log ( int  level,
const char *  file,
int  line,
const char *  fmt,
  ... 
)

◆ log_set_level()

void log_set_level ( int  level)

◆ log_set_lock()

void log_set_lock ( log_LockFn  fn,
void *  udata 
)

◆ log_set_quiet()

void log_set_quiet ( bool  enable)

◆ stdout_callback()

static void stdout_callback ( Log_Event ev)
static

◆ unlock()

static void unlock ( void  )
static

Variable Documentation

◆ callbacks

◆ 

struct { ... } L

◆ level

int level

◆ level_strings

const char* level_strings[]
static
Initial value:
= {
"TRACE", "DEBUG", "INFO", "WARN", "ERROR", "FATAL"
}

◆ lock

static void lock ( void  )

◆ quiet

bool quiet

◆ udata

void* udata