|
rpm
4.10.90
|
Typedefs | |
| typedef enum rpmlogLvl_e | rpmlogLvl |
| RPM Log levels. | |
| typedef enum rpmlogFac_e | rpmlogFac |
| facility codes | |
| 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 } |
| RPM Log levels. More... | |
| enum | rpmlogFac_e { RPMLOG_KERN = (0<<3), RPMLOG_USER = (1<<3), RPMLOG_MAIL = (2<<3), RPMLOG_DAEMON = (3<<3), RPMLOG_AUTH = (4<<3), RPMLOG_SYSLOG = (5<<3), RPMLOG_LPR = (6<<3), RPMLOG_NEWS = (7<<3), RPMLOG_UUCP = (8<<3), RPMLOG_CRON = (9<<3), RPMLOG_AUTHPRIV = (10<<3), RPMLOG_FTP = (11<<3), RPMLOG_LOCAL0 = (16<<3), RPMLOG_LOCAL1 = (17<<3), RPMLOG_LOCAL2 = (18<<3), RPMLOG_LOCAL3 = (19<<3), RPMLOG_LOCAL4 = (20<<3), RPMLOG_LOCAL5 = (21<<3), RPMLOG_LOCAL6 = (22<<3), RPMLOG_LOCAL7 = (23<<3) } |
| facility codes More... | |
Functions | |
| const char * | rpmlogRecMessage (rpmlogRec rec) |
| Retrieve log message string from rpmlog record. | |
| rpmlogLvl | rpmlogRecPriority (rpmlogRec rec) |
| Retrieve log priority from rpmlog record. | |
| int | rpmlogGetNrecs (void) |
| Return number of rpmError() ressages. | |
| 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. | |
| void | rpmlog (int code, const char *fmt,...) RPM_GNUC_PRINTF(2 |
| Generate a log message using FMT string and option arguments. | |
| void const char * | rpmlogMessage (void) |
| Return text of last rpmError() message. | |
| int | rpmlogCode (void) |
| Return error code from last rpmError() message. | |
| const char * | rpmlogLevelPrefix (rpmlogLvl pri) |
| Return translated prefix string (if any) given log level. | |
| rpmlogCallback | rpmlogSetCallback (rpmlogCallback cb, rpmlogCallbackData data) |
| Set rpmlog callback function. | |
| FILE * | rpmlogSetFile (FILE *fp) |
| Set rpmlog file handle. | |
| typedef int(* rpmlogCallback)(rpmlogRec rec, rpmlogCallbackData data) |
| typedef enum rpmlogFac_e rpmlogFac |
facility codes
| typedef enum rpmlogLvl_e rpmlogLvl |
RPM Log levels.
priorities/facilities are encoded into a single 32-bit quantity, where the bottom 3 bits are the priority (0-7) and the top 28 bits are the facility (0-big number). Both the priorities and the facilities map roughly one-to-one to strings in the syslogd(8) source code. This mapping is included in this file.
priorities (these are ordered)
| enum rpmlogFac_e |
facility codes
| enum rpmlogLvl_e |
RPM Log levels.
priorities/facilities are encoded into a single 32-bit quantity, where the bottom 3 bits are the priority (0-7) and the top 28 bits are the facility (0-big number). Both the priorities and the facilities map roughly one-to-one to strings in the syslogd(8) source code. This mapping is included in this file.
priorities (these are ordered)
| void rpmlog | ( | int | code, |
| const char * | fmt, | ||
| ... | |||
| ) |
Generate a log message using FMT string and option arguments.
Referenced by buildArgCallback(), checkSpec(), isSpecFile(), getTarSpec(), and buildForTarget().
| 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.
| 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) |
| const char* rpmlogRecMessage | ( | rpmlogRec | rec | ) |
Retrieve log message string from rpmlog record.
| rec | rpmlog record |
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) |
1.7.5