|
rpm
5.4.10
|
#include "system.h"#include <stdarg.h>#include <rpmiotypes.h>#include <rpmlog.h>#include "debug.h"
Go to the source code of this file.
Macros | |
| #define | _RPMLOG_INTERNAL |
Functions | |
| int | rpmlogGetNrecs (void) |
| Return number of messages. | |
| int | rpmlogCode (void) |
| Return error code from last rpmError() message. | |
| const char * | rpmlogMessage (void) |
| Return text of last rpmError() message. | |
| const char * | rpmlogRecMessage (rpmlogRec rec) |
| Retrieve log message string from rpmlog record. | |
| rpmlogLvl | rpmlogRecPriority (rpmlogRec rec) |
| Retrieve log priority from rpmlog record. | |
| void | rpmlogPrint (FILE *f) |
| Print all rpmError() messages. | |
| void | rpmlogClose (void) |
| Close desriptor used to write to system logger. | |
| void | rpmlogOpen (const char *ident, int option, int facility) |
| Open connection to system logger. | |
| int | rpmlogSetMask (int mask) |
| Set the log mask level. | |
| rpmlogCallback | rpmlogSetCallback (rpmlogCallback cb, rpmlogCallbackData data) |
| Set rpmlog callback function. | |
| void | rpmlogGetCallback (rpmlogCallback *cb, rpmlogCallbackData *data) |
| Get rpmlog callback function and data. | |
| static int | rpmlogDefault (rpmlogRec rec) |
| FILE * | rpmlogSetFile (FILE *fp) |
| Set rpmlog file handle. | |
| const char * | rpmlogLevelPrefix (rpmlogLvl pri) |
| Return translated prefix string (if any) given log level. | |
| static int | vsnprintf (char *buf, int nb, const char *fmt, va_list ap) |
| void | vrpmlog (unsigned code, const char *fmt, va_list ap) |
| Same as _rpmlog with stdarg argument list. | |
| void | _rpmlog (int code, const char *fmt,...) |
| Generate a log message using FMT string and option arguments. | |
Variables | |
| static int | nrecs = 0 |
| static rpmlogRec | recs = NULL |
| static unsigned | rpmlogMask = RPMLOG_UPTO( RPMLOG_NOTICE ) |
| static rpmlogCallback | _rpmlogCallback |
| static rpmlogCallbackData | _rpmlogCallbackData |
| static FILE * | _stdlog = NULL |
| static const char * | rpmlogMsgPrefix [] |
Definition in file rpmlog.c.
| void _rpmlog | ( | int | code, |
| const char * | fmt, | ||
| ... | |||
| ) |
| void rpmlogClose | ( | void | ) |
| int rpmlogCode | ( | void | ) |
Return error code from last rpmError() message.
|
static |
Definition at line 137 of file rpmlog.c.
References RPMLOG_ALERT, RPMLOG_CRIT, RPMLOG_DEBUG, RPMLOG_EMERG, RPMLOG_ERR, RPMLOG_EXIT, RPMLOG_INFO, RPMLOG_NOTICE, RPMLOG_WARNING, and rpmlogLevelPrefix().
Referenced by vrpmlog().
| void rpmlogGetCallback | ( | rpmlogCallback * | cb, |
| rpmlogCallbackData * | data | ||
| ) |
Get rpmlog callback function and data.
| cb | pointer to rpmlog callback function |
| data | pointer to callback private (user) data |
Definition at line 126 of file rpmlog.c.
References _rpmlogCallback, and _rpmlogCallbackData.
| int rpmlogGetNrecs | ( | void | ) |
Return number of messages.
Definition at line 23 of file rpmlog.c.
References nrecs.
Referenced by buildSpec().
| const char* rpmlogLevelPrefix | ( | rpmlogLvl | pri | ) |
Return translated prefix string (if any) given log level.
| pri | log priority |
Definition at line 190 of file rpmlog.c.
Referenced by rpmlogDefault().
| const char* rpmlogMessage | ( | void | ) |
| void rpmlogOpen | ( | const char * | ident, |
| int | option, | ||
| int | facility | ||
| ) |
| void rpmlogPrint | ( | FILE * | f | ) |
Print all rpmError() messages.
| f | file handle (NULL uses stderr) |
Definition at line 55 of file rpmlog.c.
References nrecs.
Referenced by buildSpec().
| const char* rpmlogRecMessage | ( | rpmlogRec | rec | ) |
| rpmlogCallback rpmlogSetCallback | ( | rpmlogCallback | cb, |
| rpmlogCallbackData | data | ||
| ) |
Set rpmlog callback function.
| cb | rpmlog callback function |
| data | callback private (user) data |
Definition at line 116 of file rpmlog.c.
References _rpmlogCallback.
| FILE* rpmlogSetFile | ( | FILE * | fp | ) |
Set rpmlog file handle.
| fp | rpmlog file handle (NULL uses stdout/stderr) |
Definition at line 167 of file rpmlog.c.
References _stdlog.
Referenced by setLogFile().
| int rpmlogSetMask | ( | int | mask | ) |
Set the log mask level.
| mask | log mask (0 is no operation) |
Definition at line 100 of file rpmlog.c.
References rpmlogMask.
| void vrpmlog | ( | unsigned | code, |
| const char * | fmt, | ||
| va_list | ap | ||
| ) |
Same as _rpmlog with stdarg argument list.
Definition at line 206 of file rpmlog.c.
References _free(), _rpmlogCallback, EXIT_FAILURE, nrecs, RPMLOG_DEFAULT, RPMLOG_EXIT, RPMLOG_FAC, RPMLOG_MASK, RPMLOG_PRI, RPMLOG_WARNING, rpmlogDefault(), vsnprintf(), xmalloc, xrealloc, and xstrdup().
|
inlinestatic |
|
static |
Definition at line 111 of file rpmlog.c.
Referenced by rpmlogGetCallback(), rpmlogSetCallback(), and vrpmlog().
|
static |
Definition at line 114 of file rpmlog.c.
Referenced by rpmlogGetCallback().
|
static |
Definition at line 135 of file rpmlog.c.
Referenced by rpmlogSetFile().
|
static |
Definition at line 19 of file rpmlog.c.
Referenced by rpmlogClose(), rpmlogGetNrecs(), rpmlogPrint(), and vrpmlog().
|
static |
Definition at line 21 of file rpmlog.c.
Referenced by fpLookupSubdir(), handleOverlappedFiles(), and rpmtsCheckInstalledFiles().
|
static |
Definition at line 93 of file rpmlog.c.
Referenced by rpmlogSetMask().
1.8.1.2