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 |
Header - Log activities.
Definition in file logger.h.
#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().
bool add_log | ( | int | level, | |
const char * | context, | |||
const char * | format, | |||
... | ||||
) |
add an entry to log file
level | log level | |
context | of event (object, library, etc.) - utf8 | |
format | text to log (printf format) - utf8 |
Definition at line 57 of file logger.c.
References CONFIG_LOG_FILENAME, CONFIG_LOG_LEVEL, LOG_DEBUG, and LOG_EMERG.
Referenced by asf_generate_row(), db5_dat_delete_row(), db5_dat_init(), db5_dat_insert(), db5_dat_select_by_filename(), db5_dat_select_row(), db5_dat_update(), db5_delete(), db5_exists(), db5_generate_row(), db5_hdr_count(), db5_hdr_grow(), db5_hdr_init(), db5_index(), db5_index_index_column(), db5_insert(), db5_localfile(), db5_longname_to_shortname(), db5_print_row(), db5_select_filename(), db5_shortname_to_localfile(), db5_update(), file_fcaseopen(), file_filesize(), file_filesize_f(), file_set_context(), file_truncate(), fuse_impl_create(), fuse_impl_destroy(), fuse_impl_flush(), fuse_impl_fsync(), fuse_impl_getattr(), fuse_impl_init(), fuse_impl_open(), fuse_impl_read(), fuse_impl_readdir(), fuse_impl_rename(), fuse_impl_statfs(), fuse_impl_truncate(), fuse_impl_unlink(), fuse_impl_utimens(), fuse_impl_write(), log_dump(), log_dump_latin1(), mp3_generate_row(), names_delete(), names_init(), names_insert(), names_print(), names_save(), and names_select_shortname().
bool log_dump | ( | const char * | var, | |
const char * | value | |||
) |
dump a (utf8) string variable to log
var | name of variable - utf8 | |
value | variable content - utf8 |
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
var | name of variable - utf8 | |
value | variable content - latin1 |
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().