Anjay Lite
Loading...
Searching...
No Matches
log_impl_decls.h File Reference
#include <anj/init.h>
#include <stdarg.h>
#include <stddef.h>

Go to the source code of this file.

Enumerations

enum  anj_log_level_t {
  ANJ_LOG_LEVEL_L_TRACE , ANJ_LOG_LEVEL_L_DEBUG , ANJ_LOG_LEVEL_L_INFO , ANJ_LOG_LEVEL_L_WARNING ,
  ANJ_LOG_LEVEL_L_ERROR , ANJ_LOG_LEVEL_L_MUTED
}
 

Functions

void anj_log_handler_impl_full (anj_log_level_t level, const char *module, const char *file, int line, const char *format,...)
 
void anj_log_handler_output (const char *output, size_t len)
 

Enumeration Type Documentation

◆ anj_log_level_t

Specifies level of a log statement.

NOTE: Log macros are expecting the level without the ANJ_LOG_LEVEL_ prefix.

NOTE: On design choice - the options are named L_level instead of just level as an attempt to avoid collisions with applications that define e.g. DEBUG

Enumerator
ANJ_LOG_LEVEL_L_TRACE 
ANJ_LOG_LEVEL_L_DEBUG 
ANJ_LOG_LEVEL_L_INFO 
ANJ_LOG_LEVEL_L_WARNING 
ANJ_LOG_LEVEL_L_ERROR 
ANJ_LOG_LEVEL_L_MUTED 

Function Documentation

◆ anj_log_handler_impl_full()

void anj_log_handler_impl_full ( anj_log_level_t  level,
const char *  module,
const char *  file,
int  line,
const char *  format,
  ... 
)

◆ anj_log_handler_output()

void anj_log_handler_output ( const char *  output,
size_t  len 
)

Function used to output the formatted log strings, if one of builtin handler implementations is enabled.

NOTE: if ANJ_LOG_HANDLER_OUTPUT_ALT is enabled, user must implement this function.

Parameters
outputFormatted log statement to output.
lenLength of formatted log statement, effectively equal to strlen(output)