Go to the source code of this file.
Wrappers | |
After including log.h you have to define the current zone with the following statement: #define LOG_ZONE "CURRENT ZONE" | |
| #define | LOGIT(b...) {logit(b);} |
| Wrapper for logging. | |
| #define | LOG_INIT(logfile, sysmode) {log_init(logfile,sysmode);} |
| Wrapper for module init. | |
| #define | LOG_END() {log_end();} |
| Wrapper for module shutdown. | |
| #define | MALLOC_CHECK(p) |
| overrides MALLOC_CHECK | |
| #define | ERROR_ABORT(a) |
| overrides ERROR_ABORT | |
| #define | ERROR_PRINT(a) |
| overrides ERROR_PRINT | |
| #define | DBG(a...) |
| DBG needs -v -v. | |
| #define | SAY(a...) |
| SAY needs -v. | |
Defines | |
| #define | MAX_LOG_SIZE 3000000 |
| max logfile size in bytes | |
| #define | MAX_LOG_STRING 1000 |
| len of the log string | |
Functions | |
| int | logit (char *zone, char *str,...) |
| log in a pretty way | |
| int | log_init (char *logfile, int syslogmode) |
| initialize the log module | |
| int | log_end (void) |
| shut down the module | |
| int | log_get_verbosity (void) |
| get verbosity level | |
| void | log_set_verbosity (int v) |
| set verbosity level | |
| int | log_rotate (char *logfile) |
| char * | log_get_logfile (void) |
>Definition in file log.h.
|
|
Value: {\
if (log_get_verbosity() >= 2) {\
LOGIT(LOG_ZONE,"DBG(%s,%4d): ",\
__FILE__,__LINE__);\
LOGIT(LOG_ZONE,a);\
}\
}
|
|
|
Value: {\
LOGIT(LOG_ZONE,"ABORT(%s,%4d): %s",__FILE__,__LINE__,a);\
abort();\
}
|
|
|
Value: {\
LOGIT(LOG_ZONE,"ERROR(%s,%4d): %s",__FILE__,__LINE__,a);\
}
|
|
|
Wrapper for module shutdown.
|
|
|
Wrapper for module init.
|
|
|
Wrapper for logging.
|
|
|
Value: {\
if(p == NULL) \
ERROR_ABORT("Unable to malloc\n");\
}
|
|
|
max logfile size in bytes
|
|
|
len of the log string
|
|
|
Value: {\
if (log_get_verbosity() >= 1) {\
LOGIT(LOG_ZONE,a);\
}\
}
|
|
|
shut down the module
|
|
|
|
|
|
get verbosity level
|
|
||||||||||||
|
initialize the log module
|
|
|
|
|
|
set verbosity level
|
|
||||||||||||||||
|
log in a pretty way
|
1.3.6-20040222