#include "common.h"
#include <varargs.h>
Include dependency graph for logger.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Defines | |
| #define | PDEPP_CORE 0 |
| log message issued by daemon. | |
| #define | QUERY_HANDLER 1 |
| log message issued by the client manager. | |
| #define | LOGGER 2 |
| log message issued by the logger itself. | |
| #define | CONF_TABLE 3 |
| log message issued by the configuration table manager. | |
| #define | CONN_HANDLER 4 |
| log msg. issued by a connection handler. | |
| #define | PROT_HANDLER 5 |
| log message issued by a protocol handler. | |
| #define | REQUEST_HANDLER 6 |
| log message issued by a request handler. | |
| #define | MIME_TABLE 7 |
| MIME-type related log message. | |
| #define | LOG_SRC_LAST MIME_TABLE |
| "pointer" to the last logging source defined. | |
| #define | LOG_SRC_PLACEHOLDER_ALL "A" |
| this one stands for "select all msg sources". | |
| #define | DEBUG 0 |
| debug messages. | |
| #define | LOG_KEY_DEBUG "d" |
| log file key. | |
| #define | INFO 1 |
| informational messages. | |
| #define | LOG_KEY_INFO "i" |
| log file key. | |
| #define | NOTICE 2 |
| important informational messages. | |
| #define | LOG_KEY_NOTICE "n" |
| log file key. | |
| #define | WARNING 3 |
| non critical warnings. | |
| #define | LOG_KEY_WARNING "w" |
| log file key. | |
| #define | ERROR 4 |
| errors. | |
| #define | LOG_KEY_ERROR "e" |
| log file key. | |
| #define | CRITICAL 5 |
| critical errors (server aborting). | |
| #define | LOG_KEY_CRITICAL "c" |
| log file key. | |
| #define | LOG_LVL_LAST CRITICAL |
| "pointer" to the highest sev. level defined. | |
| #define | LOG_LVL_PLACEHOLDER_ALL "a" |
| this one stands for "select all severity levels". | |
| #define | LOG_NULL_STREAM "no" |
| name of the "null" logging stream. | |
| #define | LOG_NULL_FORMAT "off" |
| format string to give to switch logging of. | |
| #define | LOG_PANIC_FORMAT "%h:%m:%s> %S: %L\\n" |
| std. format for stderr. | |
| #define | MP '%' |
| the format char for symbols. | |
| #define | MP_YEAR 'Y' |
| the format abbreviation for "year". | |
| #define | MP_MONTH 'M' |
| the format abbreviation for "month". | |
| #define | MP_DAY 'D' |
| the format abbreviation for "day". | |
| #define | MP_WDAY 'w' |
| the format abbreviation for "day of week (short)". | |
| #define | MP_WDAYL 'W' |
| the format abbreviation for "day of week (long)". | |
| #define | MP_HOUR 'h' |
| the format abbreviation for "hour". | |
| #define | MP_MIN 'm' |
| the format abbreviation for "minute". | |
| #define | MP_SEC 's' |
| the format abbreviation for "second". | |
| #define | MP_SRC 'S' |
| the format abbreviation for "source". | |
| #define | MP_LOG 'L' |
| the format abbreviation for "log content". | |
| #define | WD_SHORT 0 |
| for short day_of_week. | |
| #define | WD_LONG 1 |
| for long day_of_week. | |
Typedefs | |
| typedef Logger * | Logger |
| a convenience name for a Logger object. | |
Functions | |
| Logger | logInit (const char *file_name, const char *format) |
| opens a new logfile. returns 0 an success. More... | |
| Logger | logInitStream (FILE *log_stream, const char *format) |
| sets the current logging stream to use the given stream log_stream. More... | |
| int | logMessagev (Logger this, const unsigned int origin, const unsigned int severity, const int errno_val, const char *const log_text_format, va_list daten) |
| Low level function to write a message into on specific Logger object. May well become an internal function in the near future. | |
| int | logTerminate (Logger this) |
| terminates a Logger object. More... | |
| int | logfilesInit () |
| initialises the logging subsystem. More... | |
| int | logerr (const unsigned int source, const unsigned int severity, const int errno_val, const char *const log_text_format,...) |
| writes an error message with error code description. More... | |
| int | logger (const unsigned int origin, const unsigned int severity, const char *const log_text,...) |
| writes a generic logging message. More... | |
| int | logfilesTerminate () |
| shuts down the logging subsystem. More... | |
Definition in file logger.h.
|
||||||||||||
|
opens a new logfile. returns 0 an success.
Configures the logger to use file_name as the default logging output stream.
|
|
||||||||||||
|
sets the current logging stream to use the given stream log_stream.
Configures logger to use log_stream as its default output stream.
Referenced by logfilesInit().
|
|
|
terminates a Logger object.
Referenced by logfilesInit(), and logfilesTerminate().
|
|
||||||||||||||||||||||||
|
writes an error message with error code description.
Referenced by chInit(), chReceive(), chSend(), copyRequestLine(), initServer(), main(), mimeInit(), readConfigFile(), rhfInit(), rhfSend(), and svMain().
|
|
|
initialises the logging subsystem.
logfilesInit() initialises the log message subsystem, using all configured logfiles if the configuration data is already read or stderr as the default output stream.
|
|
|
shuts down the logging subsystem.
Frees all ressources allocated by the logging system and closes all logging streams. Do not use logger or logerr after calling this function!
|
|
||||||||||||||||||||
|
writes a generic logging message.
Referenced by chInit(), chReceive(), chSend(), chTerminate(), changeUserGroupID(), main(), strToTimet(), svCloseConnection(), and svMain().
|
1.2.11.1 written by Dimitri van Heesch,
© 1997-2001