#include <config.h>#include <stdio.h>#include <stdlib.h>#include <stdarg.h>#include <string.h>#include <time.h>#include <errno.h>#include <unistd.h>#include "log.h"Include dependency graph for log.c:

Go to the source code of this file.
Defines | |
| #define | BUFSIZE 512 |
Functions | |
| int | log_printf (enum log_types type, const char *logmsg,...) |
| log a variable-format/token log message | |
| FILE * | log_init (const char *filename, int verbose) |
| initialize the log. | |
| void | log_finish (FILE *f) |
| close the log file | |
Variables | |
| FILE * | log_file |
| FILE representing the open log file. | |
| int | log_types_mask = LOG_ERROR | LOG_INFO |
| bitfield of the log levels that are to be logged to the log_file. | |
| int | log_debug_mask = 0 |
| #define BUFSIZE 512 |
| FILE* log_init | ( | const char * | filename, | |
| int | verbose | |||
| ) |
initialize the log.
If "stdout" or "stderr" are used, the existing streams will be returned.
| filename | name of file to use | |
| verbose | print a message to show the filename being opened |
Definition at line 70 of file log.c.
Referenced by main().
| int log_printf | ( | enum log_types | type, | |
| const char * | logmsg, | |||
| ... | ||||
| ) |
log a variable-format/token log message
Definition at line 43 of file log.c.
References BUFSIZE, LOG_DEBUG, log_debug_mask, log_file, LOG_MASK_MAJOR, LOG_MASK_MINOR, and log_types_mask.
Referenced by main(), pool_cleanup(), pool_get(), pool_init(), pool_put(), query_chmod(), query_chown(), query_fsck(), query_getattr(), query_inode_full(), query_inuse_inc(), query_mkdirentry(), query_mknod(), query_purge_deleted(), query_read(), query_readdir(), query_rename(), query_rmdirentry(), query_set_deleted(), query_size(), query_size_block(), query_truncate(), and query_utime().
| int log_debug_mask = 0 |
| FILE* log_file |
FILE representing the open log file.
Defaulting to stderr, this file is defined by log_init() in main() when the "-ologfile=" option is used
Definition at line 22 of file log.c.
Referenced by log_printf(), and main().
| int log_types_mask = LOG_ERROR | LOG_INFO |
bitfield of the log levels that are to be logged to the log_file.
Defaults to LOG_ERROR | LOG_INFO
Definition at line 24 of file log.c.
Referenced by log_printf().
1.4.7