The Netsukuku Project  0.0.9
An Alternative routing method
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
log.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <syslog.h>
#include <errno.h>
#include "log.h"
Include dependency graph for log.c:

Functions

void log_init (char *prog, int dbg, int log_stderr)
 
int log_to_file (char *filename)
 
void close_log_file (void)
 
void fatal (const char *fmt,...)
 
void error (const char *fmt,...)
 
void loginfo (const char *fmt,...)
 
void debug (int lvl, const char *fmt,...)
 
void print_log (int level, const char *fmt, va_list args)
 

Variables

char * __argv0
 
int dbg_lvl
 
int log_to_stderr
 
static int log_facility =LOG_DAEMON
 
int log_file_opened =0
 
FILE * log_file
 
FILE * log_fd
 

Function Documentation

void close_log_file ( void  )

Here is the caller graph for this function:

void debug ( int  lvl,
const char *  fmt,
  ... 
)

Here is the call graph for this function:

void error ( const char *  fmt,
  ... 
)

Here is the call graph for this function:

void fatal ( const char *  fmt,
  ... 
)

Flush the stream if we want to read something

Here is the call graph for this function:

void log_init ( char *  prog,
int  dbg,
int  log_stderr 
)

Here is the caller graph for this function:

int log_to_file ( char *  filename)

Here is the call graph for this function:

Here is the caller graph for this function:

void loginfo ( const char *  fmt,
  ... 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void print_log ( int  level,
const char *  fmt,
va_list  args 
)

Here is the caller graph for this function:

Variable Documentation

char* __argv0
int dbg_lvl
int log_facility =LOG_DAEMON
static
FILE * log_fd
FILE* log_file
int log_file_opened =0
int log_to_stderr