Functions for logging.  
More...
#include <syslog.h>
#include <keymap/context.h>
Go to the source code of this file.
| 
Defines | 
| #define | lk_log_cond(ctx, level, arg...) | 
| #define | DBG(ctx, arg...)   lk_log_cond(ctx, LOG_DEBUG,   ## arg) | 
| #define | INFO(ctx, arg...)   lk_log_cond(ctx, LOG_INFO,    ## arg) | 
| #define | WARN(ctx, arg...)   lk_log_cond(ctx, LOG_WARNING, ## arg) | 
| #define | ERR(ctx, arg...)   lk_log_cond(ctx, LOG_ERR,     ## arg) | 
| 
Functions | 
| void | lk_log (struct lk_ctx *ctx, int priority, const char *file, int line, const char *fn, const char *fmt,...) | 
Detailed Description
Define Documentation
Value:do { \
                if (ctx->log_priority >= level) \
                        lk_log(ctx, level, __FILE__, __LINE__, __func__, ## arg);\
        } while (0)
 
 
Wrapper to output debug-level messages 
- Parameters:
- 
  
    | ctx | is a keymap library context. |  | arg | is output message. |  
 
 
 
Wrapper to output informational messages 
- Parameters:
- 
  
    | ctx | is a keymap library context. |  | arg | is output message. |  
 
 
 
Wrapper to output warning conditions 
- Parameters:
- 
  
    | ctx | is a keymap library context. |  | arg | is output message. |  
 
 
 
Wrapper to output error conditions 
- Parameters:
- 
  
    | ctx | is a keymap library context. |  | arg | is output message. |  
 
 
 
Function Documentation
      
        
          | void lk_log | ( | struct lk_ctx * | ctx, | 
        
          |  |  | int | priority, | 
        
          |  |  | const char * | file, | 
        
          |  |  | int | line, | 
        
          |  |  | const char * | fn, | 
        
          |  |  | const char * | fmt, | 
        
          |  |  |  | ... | 
        
          |  | ) |  |  | 
      
 
Logging function which uses log_fn and log_data to write log messages. 
- Parameters:
- 
  
    | ctx | is a keymap library context. |  | priority | indicates the priority. |