klog.h File Reference

Logging module. More...

#include <stdint.h>
#include <stdio.h>
#include <csp/csp_types.h>
#include "kubos-core/k_log.h"

Go to the source code of this file.

Data Structures

struct  klog_config
 
struct  klog_handle
 

Macros

#define KLOG_MAX_LINE   255
 
#define KLOG(handle, level, logger, ...)   klog_write(handle, level, logger, __VA_ARGS__)
 
#define KLOG_ERR(handle, logger, ...)   KLOG(handle, LOG_ERROR, logger, __VA_ARGS__)
 
#define KLOG_WARN(handle, logger, ...)   KLOG(handle, LOG_WARNING, logger, __VA_ARGS__)
 
#define KLOG_TELEMETRY(handle, logger, ...)   KLOG(handle, LOG_TELEMETRY, logger, __VA_ARGS__)
 
#define KLOG_INFO(handle, logger, ...)   KLOG(handle, LOG_INFO, logger, __VA_ARGS__)
 
#define KLOG_DEBUG(handle, logger, ...)   KLOG(handle, LOG_DEBUG, logger, __VA_ARGS__)
 
#define KLOG_SUFFIX_LEN   4
 
#define KLOG_PATH_LEN   255
 
#define KLOG_MAX_PATH   (KLOG_PATH_LEN - KLOG_SUFFIX_LEN - 1)
 
#define KLOG_PART_SIZE_DEFAULT   (1024 * 512)
 
#define KLOG_MAX_PARTS_DEFAULT   4
 
#define klog_write(handle, level, logger, ...)
 

Functions

int klog_init_file (klog_handle *handle)
 
void klog_console (unsigned level, const char *logger, const char *format,...)
 
void klog_file (klog_handle *handle, unsigned level, const char *logger, const char *format,...)
 
void klog_cleanup (klog_handle *handle)