RPM Logging facilities.  
More...
RPM Logging facilities. 
◆ RPMLOG_DEFAULT
      
        
          | #define RPMLOG_DEFAULT   0x01 | 
      
 
Option flags for callback return value. perform default logging 
 
 
◆ rpmlogCallback
      
        
          | typedef int(* rpmlogCallback) (rpmlogRec rec, rpmlogCallbackData data) | 
      
 
- Parameters
- 
  
    | rec | rpmlog record |  | data | private callback data |  
 
- Returns
- flags to define further behavior: RPMLOG_DEFAULT to perform default logging, RPMLOG_EXIT to exit after processing, 0 to return after callback 
 
 
◆ rpmlogLvl
RPM Log levels. Priorities are encoded into bottom 3 bits of a single 32 bit quantity. The top 28 bits are currently unused. 
 
 
◆ 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. 
| Enumerator | 
|---|
| RPMLOG_EMERG | system is unusable  | 
| RPMLOG_ALERT | action must be taken immediately  | 
| RPMLOG_CRIT | critical conditions  | 
| RPMLOG_ERR | error conditions  | 
| RPMLOG_WARNING | warning conditions  | 
| RPMLOG_NOTICE | normal but significant condition  | 
| RPMLOG_INFO | informational  | 
| RPMLOG_DEBUG | debug-level messages  | 
 
 
◆ rpmlog()
      
        
          | void rpmlog | ( | int | code, | 
        
          |  |  | const char * | fmt, | 
        
          |  |  |  | ... ) | 
      
 
Generate a log message using FMT string and option arguments. 
 
 
◆ rpmlogClose()
      
        
          | void rpmlogClose | ( | void |  | ) |  | 
      
 
Close desriptor used to write to system logger. 
- Todo
- Implement. 
 
 
◆ rpmlogCode()
Return error code from last rpmError() message. 
- Deprecated
- Perl-RPM needs, what's really needed is predictable, non-i18n encumbered, error text that can be retrieved through rpmlogMessage() and parsed IMHO. 
- Returns
- code from last message 
 
 
◆ rpmlogGetNrecs()
      
        
          | int rpmlogGetNrecs | ( | void |  | ) |  | 
      
 
Return number of rpmError() ressages. 
- Returns
- number of messages 
 
 
◆ rpmlogGetNrecsByMask()
      
        
          | int rpmlogGetNrecsByMask | ( | unsigned | mask | ) |  | 
      
 
Return number of rpmError() messages matching a log mask. 
- Parameters
- 
  
    | mask | log mask to filter by (0 is no filtering) |  
 
- Returns
- number of messages matching the mask 
 
 
◆ rpmlogLevelPrefix()
      
        
          | const char * rpmlogLevelPrefix | ( | rpmlogLvl | pri | ) |  | 
      
 
Return translated prefix string (if any) given log level. 
- Parameters
- 
  
  
- Returns
- message prefix (or "" for none) 
 
 
◆ rpmlogMessage()
      
        
          | void const char * rpmlogMessage | ( | void |  | ) |  | 
      
 
Return text of last rpmError() message. 
- Returns
- text of last message 
 
 
◆ rpmlogOpen()
      
        
          | void rpmlogOpen | ( | const char * | ident, | 
        
          |  |  | int | option, | 
        
          |  |  | int | facility ) | 
      
 
Open connection to system logger. 
- Todo
- Implement. 
 
 
◆ rpmlogPrint()
      
        
          | void rpmlogPrint | ( | FILE * | f | ) |  | 
      
 
Print all rpmError() messages. 
- Parameters
- 
  
    | f | file handle (NULL uses stderr) |  
 
 
 
◆ rpmlogPrintByMask()
      
        
          | void rpmlogPrintByMask | ( | FILE * | f, | 
        
          |  |  | unsigned | mask ) | 
      
 
Print all rpmError() messages matching a log mask. 
- Parameters
- 
  
    | f | file handle (NULL uses stderr) |  | mask | log mask to filter by (0 is no filtering) |  
 
 
 
◆ rpmlogRecMessage()
      
        
          | const char * rpmlogRecMessage | ( | rpmlogRec | rec | ) |  | 
      
 
Retrieve log message string from rpmlog record 
- Parameters
- 
  
  
- Returns
- log message 
 
 
◆ rpmlogRecPriority()
Retrieve log priority from rpmlog record 
- Parameters
- 
  
  
- Returns
- log priority 
 
 
◆ rpmlogSetCallback()
Set rpmlog callback function. 
- Parameters
- 
  
    | cb | rpmlog callback function |  | data | callback private (user) data |  
 
- Returns
- previous rpmlog callback function 
 
 
◆ rpmlogSetFile()
      
        
          | FILE * rpmlogSetFile | ( | FILE * | fp | ) |  | 
      
 
Set rpmlog file handle. 
- Parameters
- 
  
    | fp | rpmlog file handle (NULL uses stdout/stderr) |  
 
- Returns
- previous rpmlog file handle 
 
 
◆ rpmlogSetMask()
      
        
          | int rpmlogSetMask | ( | int | mask | ) |  | 
      
 
Set the log mask level. 
- Parameters
- 
  
    | mask | log mask (0 is no operation) |  
 
- Returns
- previous log mask