Provides interface between libunbound and the FreeRADIUS event loop.  
More...
#include <freeradius-devel/util/syserror.h>
#include "log.h"
Go to the source code of this file.
Provides interface between libunbound and the FreeRADIUS event loop. 
- Id
- 43a2fa5c1478a22af7386fe691d4a5f177de3ff1 
- Copyright
- 2019 The FreeRADIUS server project 
- 
2019 Arran Cudbard-Bell (a.cud.nosp@m.bard.nosp@m.b@fre.nosp@m.erad.nosp@m.ius.o.nosp@m.rg) 
Definition in file log.c.
◆ LOG_PREFIX
Definition at line 27 of file log.c.
 
 
◆ _unbound_log_free()
◆ _unbound_log_write()
  
  | 
        
          | static ssize_t _unbound_log_write | ( | void * | cookie, |  
          |  |  | char const * | buf, |  
          |  |  | size_t | size |  
          |  | ) |  |  |  | static | 
 
Write libunbound output to the server or request log. 
- Parameters
- 
  
    | [in] | cookie | The current thread. |  | [in] | buf | Log message from unbound. |  | [in] | size | Length of log message. |  
 
Definition at line 38 of file log.c.
 
 
◆ unbound_log_init()
      
        
          | int unbound_log_init | ( | TALLOC_CTX * | ctx, | 
        
          |  |  | unbound_log_t ** | u_log_out, | 
        
          |  |  | struct ub_ctx * | ub | 
        
          |  | ) |  |  | 
      
 
Setup an unbound context for log, and initialise a u_log struct. 
Definition at line 129 of file log.c.
 
 
◆ unbound_log_lvl_set()
  
  | 
        
          | static int unbound_log_lvl_set | ( | struct ub_ctx * | ub, |  
          |  |  | fr_log_lvl_t | lvl |  
          |  | ) |  |  |  | static | 
 
Set the debug level for a ub_ctx from the request or global debug level. 
- Parameters
- 
  
    | [in] | ub | Unbound context to set log level for. |  | [in] | lvl | To set. |  
 
- Returns
- 
- 0 on success.
- -1 on failure. 
 
Definition at line 60 of file log.c.
 
 
◆ unbound_log_to_global()
      
        
          | int unbound_log_to_global | ( | unbound_log_t * | u_log, | 
        
          |  |  | struct ub_ctx * | ub | 
        
          |  | ) |  |  | 
      
 
Switch thread-specific libunbound output to the global log. 
Must be called before a function that previously called unbound_log_to_request yields, or can no longer be certain that the request_t * set in t->request is still valid. 
Definition at line 114 of file log.c.
 
 
◆ unbound_log_to_request()
Switch thread-specific libunbound output to the request log destination(s) 
Definition at line 102 of file log.c.