Stackdb
Stackdb is a stackable, multi-target and -level source debugger and memory forensics library.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Functions | Variables
log.c File Reference
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include <unistd.h>
#include <error.h>
#include <argp.h>
#include "log.h"
Include dependency graph for log.c:

Go to the source code of this file.

Functions

void vmi_set_log_level (int level)
 
void vmi_inc_log_level (void)
 
void vmi_set_warn_level (int level)
 
void vmi_inc_warn_level (void)
 
void vmi_set_log_area_flags (log_areas_t areas, log_flags_t flags)
 
void vmi_add_log_area_flags (log_areas_t areas, log_flags_t flags)
 
int vmi_set_log_area_flaglist (char *flaglist, char *separator)
 
int vmi_add_log_area_flaglist (char *flaglist, char *separator)
 
void vmi_set_user_area_flags (char **names)
 
int vmi_log_get_flag_val (char *flag, log_areas_t *areaval, log_flags_t *flagval)
 
int vdebug_is_on (int level, log_areas_t areas, log_flags_t flags)
 
int vwarn_is_on (int level, log_areas_t areas, log_flags_t flags)
 
void _vmi_debug (int level, log_areas_t areas, log_flags_t flags, char *format,...)
 
void _vmi_warn (int level, log_areas_t areas, log_flags_t flags, char *format,...)
 
error_t log_argp_parse_opt (int key, char *arg, struct argp_state *state)
 

Variables

struct argp_option log_argp_opts []
 
struct argp log_argp
 

Function Documentation

void _vmi_debug ( int  level,
log_areas_t  areas,
log_flags_t  flags,
char *  format,
  ... 
)

Definition at line 379 of file log.c.

void _vmi_warn ( int  level,
log_areas_t  areas,
log_flags_t  flags,
char *  format,
  ... 
)

Definition at line 389 of file log.c.

error_t log_argp_parse_opt ( int  key,
char *  arg,
struct argp_state *  state 
)

Definition at line 416 of file log.c.

int vdebug_is_on ( int  level,
log_areas_t  areas,
log_flags_t  flags 
)

Definition at line 335 of file log.c.

int vmi_add_log_area_flaglist ( char *  flaglist,
char *  separator 
)

Definition at line 103 of file log.c.

void vmi_add_log_area_flags ( log_areas_t  areas,
log_flags_t  flags 
)

Definition at line 67 of file log.c.

void vmi_inc_log_level ( void  )

Definition at line 38 of file log.c.

void vmi_inc_warn_level ( void  )

Definition at line 46 of file log.c.

int vmi_log_get_flag_val ( char *  flag,
log_areas_t areaval,
log_flags_t flagval 
)

Definition at line 168 of file log.c.

int vmi_set_log_area_flaglist ( char *  flaglist,
char *  separator 
)

Definition at line 84 of file log.c.

void vmi_set_log_area_flags ( log_areas_t  areas,
log_flags_t  flags 
)

Definition at line 50 of file log.c.

void vmi_set_log_level ( int  level)

Definition at line 34 of file log.c.

void vmi_set_user_area_flags ( char **  names)

Definition at line 164 of file log.c.

void vmi_set_warn_level ( int  level)

Definition at line 42 of file log.c.

int vwarn_is_on ( int  level,
log_areas_t  areas,
log_flags_t  flags 
)

Definition at line 357 of file log.c.

Variable Documentation

struct argp log_argp
Initial value:
NULL,NULL,NULL,NULL,NULL }
error_t log_argp_parse_opt(int key, char *arg, struct argp_state *state)
Definition: log.c:416
struct argp_option log_argp_opts[]
Definition: log.c:402

Definition at line 413 of file log.c.

struct argp_option log_argp_opts[]
Initial value:
= {
{ "debug",'d',"LEVEL",OPTION_ARG_OPTIONAL,
"Set/increase the debugging level.",-2 },
{ "log-flags",'l',"FLAG,FLAG,...",0,"Set the debugging flags",-2 },
{ "warn",'w',"LEVEL",OPTION_ARG_OPTIONAL,
"Set/increase the warning level.",-2 },
{ 0,0,0,0,0,0 }
}

Definition at line 402 of file log.c.