rpm 4.19.92
The RPM Package Manager
|
Go to the source code of this file.
Macros | |
#define | RPMLOG_PRIMASK 0x07 /* mask to extract priority part (internal) */ |
#define | RPMLOG_PRI(p) ((p) & RPMLOG_PRIMASK) |
#define | RPMLOG_MAKEPRI(fac, pri) ((((unsigned)(fac)) << 3) | (pri)) |
#define | RPMLOG_NPRIS (RPMLOG_DEBUG + 1) |
#define | RPMLOG_MASK(pri) (1 << ((unsigned)(pri))) |
#define | RPMLOG_UPTO(pri) ((1 << (((unsigned)(pri))+1)) - 1) |
#define | RPMLOG_PID 0x01 |
#define | RPMLOG_CONS 0x02 |
#define | RPMLOG_ODELAY 0x04 |
#define | RPMLOG_NDELAY 0x08 |
#define | RPMLOG_NOWAIT 0x10 |
#define | RPMLOG_PERROR 0x20 |
#define | RPMLOG_DEFAULT 0x01 |
#define | RPMLOG_EXIT 0x02 |
#define | rpmSetVerbosity(_lvl) ((void)rpmlogSetMask( RPMLOG_UPTO( RPMLOG_PRI(_lvl)))) |
#define | rpmIncreaseVerbosity() ((void)rpmlogSetMask(((((unsigned)(rpmlogSetMask(0) & 0xff)) << 1) | 1))) |
#define | rpmDecreaseVerbosity() ((void)rpmlogSetMask((((int)(rpmlogSetMask(0) & 0xff)) >> 1))) |
#define | rpmIsNormal() (rpmlogSetMask(0) >= RPMLOG_MASK( RPMLOG_NOTICE )) |
#define | rpmIsVerbose() (rpmlogSetMask(0) >= RPMLOG_MASK( RPMLOG_INFO )) |
#define | rpmIsDebug() (rpmlogSetMask(0) >= RPMLOG_MASK( RPMLOG_DEBUG )) |
Typedefs | |
typedef enum rpmlogLvl_e | rpmlogLvl |
typedef struct rpmlogRec_s * | rpmlogRec |
typedef void * | rpmlogCallbackData |
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) |
Yet Another syslog(3) API clone. Used to unify rpmError() and rpmMessage() interfaces in rpm.
#define RPMLOG_CONS 0x02 |
log on the console if errors in sending
#define RPMLOG_EXIT 0x02 |
exit after logging
#define RPMLOG_MASK | ( | pri | ) | (1 << ((unsigned)(pri))) |
mask for one priority
#define RPMLOG_NDELAY 0x08 |
don't delay open
#define RPMLOG_NOWAIT 0x10 |
don't wait for console forks: DEPRECATED
#define RPMLOG_ODELAY 0x04 |
delay open until first syslog() (default)
#define RPMLOG_PERROR 0x20 |
log to stderr as well
#define RPMLOG_PID 0x01 |
log the pid with each message
#define RPMLOG_UPTO | ( | pri | ) | ((1 << (((unsigned)(pri))+1)) - 1) |
all priorities through pri