|
rpm 6.0.1
The RPM Package Manager
|
RPM Logging facilities. More...
Macros | |
| #define | RPMLOG_DEFAULT 0x01 |
Typedefs | |
| typedef enum rpmlogLvl_e | rpmlogLvl |
| typedef struct rpmlogRec_s * | rpmlogRec |
| typedef int(* | rpmlogCallback) (rpmlogRec rec, rpmlogCallbackData data) |
Enumerations | |
| enum | rpmlogLvl_e { RPMLOG_EMERG = 0 , RPMLOG_ALERT = 1 , RPMLOG_CRIT = 2 , RPMLOG_ERR = 3 , RPMLOG_WARNING = 4 , RPMLOG_NOTICE = 5 , RPMLOG_INFO = 6 , RPMLOG_DEBUG = 7 } |
Functions | |
| const char * | rpmlogRecMessage (rpmlogRec rec) |
| rpmlogLvl | rpmlogRecPriority (rpmlogRec rec) |
| int | rpmlogGetNrecsByMask (unsigned mask) |
| int | rpmlogGetNrecs (void) |
| void | rpmlogPrintByMask (FILE *f, unsigned mask) |
| void | rpmlogPrint (FILE *f) |
| void | rpmlogClose (void) |
| void | rpmlogOpen (const char *ident, int option, int facility) |
| int | rpmlogSetMask (int mask) |
| void | rpmlog (int code, const char *fmt,...) RPM_GNUC_PRINTF(2 |
| void const char * | rpmlogMessage (void) |
| int | rpmlogCode (void) |
| const char * | rpmlogLevelPrefix (rpmlogLvl pri) |
| rpmlogCallback | rpmlogSetCallback (rpmlogCallback cb, rpmlogCallbackData data) |
| FILE * | rpmlogSetFile (FILE *fp) |
RPM Logging facilities.
| #define RPMLOG_DEFAULT 0x01 |
Option flags for callback return value. perform default logging
| typedef int(* rpmlogCallback) (rpmlogRec rec, rpmlogCallbackData data) |
| rec | rpmlog record |
| data | private callback data |
| typedef enum rpmlogLvl_e rpmlogLvl |
RPM Log levels. Priorities are encoded into bottom 3 bits of a single 32 bit quantity. The top 28 bits are currently unused.
| enum rpmlogLvl_e |
RPM Log levels. Priorities are encoded into bottom 3 bits of a single 32 bit quantity. The top 28 bits are currently unused.
| void rpmlog | ( | int | code, |
| const char * | fmt, | ||
| ... ) |
Generate a log message using FMT string and option arguments.
| void rpmlogClose | ( | void | ) |
Close desriptor used to write to system logger.
| int rpmlogCode | ( | void | ) |
Return error code from last rpmError() message.
| int rpmlogGetNrecs | ( | void | ) |
Return number of rpmError() ressages.
| int rpmlogGetNrecsByMask | ( | unsigned | mask | ) |
Return number of rpmError() messages matching a log mask.
| mask | log mask to filter by (0 is no filtering) |
| const char * rpmlogLevelPrefix | ( | rpmlogLvl | pri | ) |
Return translated prefix string (if any) given log level.
| pri | log priority |
| void const char * rpmlogMessage | ( | void | ) |
Return text of last rpmError() message.
| void rpmlogOpen | ( | const char * | ident, |
| int | option, | ||
| int | facility ) |
Open connection to system logger.
| void rpmlogPrint | ( | FILE * | f | ) |
Print all rpmError() messages.
| f | file handle (NULL uses stderr) |
| void rpmlogPrintByMask | ( | FILE * | f, |
| unsigned | mask ) |
Print all rpmError() messages matching a log mask.
| f | file handle (NULL uses stderr) |
| mask | log mask to filter by (0 is no filtering) |
| const char * rpmlogRecMessage | ( | rpmlogRec | rec | ) |
Retrieve log message string from rpmlog record
| rec | rpmlog record |
| rpmlogLvl rpmlogRecPriority | ( | rpmlogRec | rec | ) |
Retrieve log priority from rpmlog record
| rec | rpmlog record |
| rpmlogCallback rpmlogSetCallback | ( | rpmlogCallback | cb, |
| rpmlogCallbackData | data ) |
Set rpmlog callback function.
| cb | rpmlog callback function |
| data | callback private (user) data |
| FILE * rpmlogSetFile | ( | FILE * | fp | ) |
Set rpmlog file handle.
| fp | rpmlog file handle (NULL uses stdout/stderr) |
| int rpmlogSetMask | ( | int | mask | ) |
Set the log mask level.
| mask | log mask (0 is no operation) |