Kaa client C SDK
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Functions
ext_system_logger.h File Reference
#include "kaa_error.h"
#include <platform/time.h>

Go to the source code of this file.

Functions

void ext_write_log (FILE *sink, const char *buffer, size_t message_size)
 
kaa_time_t ext_get_systime (void)
 
int ext_format_sprintf (char *buffer, size_t buffer_size, const char *format, const char *log_level_name, const char *truncated_name, int lineno, kaa_error_t error_code)
 Put formated LOG prefix in buffer. More...
 
int ext_snpintf (char *buffer, size_t buffer_size, const char *format,...)
 System depended snprintf implementation. More...
 
int ext_logger_sprintf (char *buffer, size_t buffer_size, const char *format, va_list args)
 

Function Documentation

int ext_format_sprintf ( char *  buffer,
size_t  buffer_size,
const char *  format,
const char *  log_level_name,
const char *  truncated_name,
int  lineno,
kaa_error_t  error_code 
)

Put formated LOG prefix in buffer.

LOG prefix format example: 1970/01/01 2:30:36 [TRACE] [kaa_bootstrap.c:38] (0) -

Parameters
[in,out]bufferBuffer to store formated log prefix.
[in]buffer_sizeSize of buffer.
[in]formatPrefix format string.
[in]log_level_nameLog level name for format.
[in]truncated_nameTruncated file name.
[in]linenoLine number in source file.
[in]error_codeError code of log message.
Returns
int number of bytes written in buffer.
kaa_time_t ext_get_systime ( void  )
int ext_logger_sprintf ( char *  buffer,
size_t  buffer_size,
const char *  format,
va_list  args 
)
int ext_snpintf ( char *  buffer,
size_t  buffer_size,
const char *  format,
  ... 
)

System depended snprintf implementation.

Snprintf with "..." in arguments

Parameters
[in,out]bufferBuffer to store formated message.
[in]buffer_sizeSize of buffer.
[in]formatMessage format.
[in]...Other arguments for message.
void ext_write_log ( FILE *  sink,
const char *  buffer,
size_t  message_size 
)