#include <string.h>
#include <time.h>
#include "rdd.h"
#include "rdd_internals.h"
#include "msgprinter.h"
Go to the source code of this file.
Data Structures | |
struct | _RDD_LOG_MSGPRINTER |
Typedefs | |
typedef struct _RDD_LOG_MSGPRINTER | RDD_LOG_MSGPRINTER |
Functions | |
static int | log_close (RDD_MSGPRINTER *printer, unsigned flags) |
static void | log_print (RDD_MSGPRINTER *printer, rdd_message_t type, int errcode, const char *msg) |
int | rdd_mp_open_log_printer (RDD_MSGPRINTER **printer, RDD_MSGPRINTER *next) |
Opens a log printer. A log printer is a stackable printer that prepends to each message a timestamp. The resulting, concatenated message is forwarded to parent printer next . | |
Variables | |
static RDD_MSGPRINTER_OPS | log_ops |
typedef struct _RDD_LOG_MSGPRINTER RDD_LOG_MSGPRINTER |
static int log_close | ( | RDD_MSGPRINTER * | printer, | |
unsigned | flags | |||
) | [static] |
Definition at line 109 of file logprinter.c.
References _RDD_LOG_MSGPRINTER::next, rdd_mp_close(), RDD_MP_RECURSE, RDD_OK, and _RDD_MSGPRINTER::state.
static void log_print | ( | RDD_MSGPRINTER * | printer, | |
rdd_message_t | type, | |||
int | errcode, | |||
const char * | msg | |||
) | [static] |
Definition at line 77 of file logprinter.c.
References error(), _RDD_LOG_MSGPRINTER::next, rdd_mp_print(), and _RDD_MSGPRINTER::state.
int rdd_mp_open_log_printer | ( | RDD_MSGPRINTER ** | printer, | |
RDD_MSGPRINTER * | next | |||
) |
Opens a log printer. A log printer is a stackable printer that prepends to each message a timestamp. The resulting, concatenated message is forwarded to parent printer next
.
Definition at line 58 of file logprinter.c.
References _RDD_LOG_MSGPRINTER::next, rdd_mp_open_printer(), RDD_OK, and _RDD_MSGPRINTER::state.
RDD_MSGPRINTER_OPS log_ops [static] |