inc/logger.h File Reference

Header - Log activities. More...

#include <stdarg.h>
#include <stdbool.h>
#include "config.h"

Go to the source code of this file.

Defines

#define LOG_EMERG   0
 log-level emergency (system is unusable)
#define LOG_ALERT   1
 log-level alert (action must be taken immediately)
#define LOG_CRIT   2
 log-level critical (critical conditions)
#define LOG_ERR   3
 log-level error (error conditions)
#define LOG_WARNING   4
 log-level warning (warning conditions)
#define LOG_NOTICE   5
 log-level notice (normal but significant condition)
#define LOG_INFO   6
 log-level info (informational)
#define LOG_DEBUG   7
 log-level debug (debug-level messages)
#define ADDLOG_CRITICAL   LOG_CRIT
 defined log-level
#define ADDLOG_CHECK   LOG_ERR
 add_log assertion is not true loglevel
#define ADDLOG_FAIL   LOG_ERR
 add_log operation failed loglevel
#define ADDLOG_RECOVER   LOG_WARNING
 add_log recoverable error loglevel
#define ADDLOG_USER_ERROR   LOG_NOTICE
 add_log error loglevel
#define ADDLOG_NOTICE   LOG_NOTICE
 add_log notice loglevel
#define ADDLOG_OPERATION   LOG_INFO
 add_log operation inform (fuse function called) loglevel
#define ADDLOG_OP_SUCCESS   LOG_DEBUG
 add_log operation success loglevel
#define ADDLOG_DEBUG   LOG_DEBUG
 add_log debug loglevel
#define ADDLOG_DUMP   LOG_DEBUG
 add_log dump loglevel
#define ADDLOG_VERBOSE   (LOG_DEBUG+1)
 add_log verbose loglevel

Functions

void open_log ()
 initialize log file
bool add_log (int level, const char *context, const char *format,...)
 add an entry to log file
void close_log ()
 close log file
bool log_dump_latin1 (const char *var, const char *value)
 dump a (latin1) string variable to log
bool log_dump (const char *var, const char *value)
 dump a (utf8) string variable to log

Detailed Description

Header - Log activities.

Author:
Julien Blitte
Version:
0.1

Definition in file logger.h.


Define Documentation

#define ADDLOG_CRITICAL   LOG_CRIT

defined log-level

log filename - utf8 add_log cirital loglevel

Definition at line 45 of file logger.h.

Referenced by db5_dat_init(), db5_hdr_init(), db5_select_filename(), and fuse_impl_init().


Function Documentation

bool add_log ( int  level,
const char *  context,
const char *  format,
  ... 
)
bool log_dump ( const char *  var,
const char *  value 
)

dump a (utf8) string variable to log

Parameters:
var name of variable - utf8
value variable content - utf8
Returns:
true if successfull

Definition at line 49 of file logger.c.

References add_log(), and ADDLOG_DUMP.

Referenced by db5_delete(), db5_generate_row(), db5_insert(), db5_longname_to_shortname(), db5_shortname_to_localfile(), db5_update(), file_fcaseopen(), file_filesize(), file_set_context(), fuse_impl_create(), fuse_impl_getattr(), fuse_impl_rename(), fuse_impl_truncate(), fuse_impl_unlink(), and fuse_impl_utimens().

bool log_dump_latin1 ( const char *  var,
const char *  value 
)

dump a (latin1) string variable to log

Parameters:
var name of variable - utf8
value variable content - latin1
Returns:
true if successfull

Definition at line 37 of file logger.c.

References add_log(), ADDLOG_DUMP, and iso8859_utf8().

Referenced by db5_delete(), db5_generate_row(), db5_insert(), db5_longname_to_shortname(), db5_print_row(), db5_shortname_to_localfile(), db5_update(), names_insert(), names_print(), and names_select_shortname().

 All Classes Files Functions Variables Typedefs Defines

Generated on Mon Jan 11 00:15:07 2010 for db5fuse by  doxygen 1.6.1