Golioth Firmware SDK
Loading...
Searching...
No Matches
golioth_debug.h File Reference
#include <golioth/config.h>
#include <stdbool.h>
#include <stdint.h>

Go to the source code of this file.

Macros

#define __UNUSED
 
#define LOG_TAG_DEFINE(tag)   static __UNUSED const char *TAG = #tag
 

Enumerations

enum  golioth_debug_log_level {
  GOLIOTH_DEBUG_LOG_LEVEL_NONE , GOLIOTH_DEBUG_LOG_LEVEL_ERROR , GOLIOTH_DEBUG_LOG_LEVEL_WARN , GOLIOTH_DEBUG_LOG_LEVEL_INFO ,
  GOLIOTH_DEBUG_LOG_LEVEL_DEBUG , GOLIOTH_DEBUG_LOG_LEVEL_VERBOSE
}
 

Functions

void golioth_debug_set_log_level (enum golioth_debug_log_level level)
 
enum golioth_debug_log_level golioth_debug_get_log_level (void)
 
void golioth_debug_hexdump (const char *tag, const void *addr, int len)
 
void golioth_debug_set_client (struct golioth_client *client)
 
void golioth_debug_set_cloud_log_enabled (bool enable)
 
void golioth_debug_printf (uint64_t tstamp_ms, enum golioth_debug_log_level level, const char *tag, const char *format,...)
 

Macro Definition Documentation

◆ __UNUSED

#define __UNUSED

Definition at line 22 of file golioth_debug.h.

◆ LOG_TAG_DEFINE

#define LOG_TAG_DEFINE ( tag)    static __UNUSED const char *TAG = #tag

Definition at line 27 of file golioth_debug.h.

Enumeration Type Documentation

◆ golioth_debug_log_level

Enumerator
GOLIOTH_DEBUG_LOG_LEVEL_NONE 
GOLIOTH_DEBUG_LOG_LEVEL_ERROR 
GOLIOTH_DEBUG_LOG_LEVEL_WARN 
GOLIOTH_DEBUG_LOG_LEVEL_INFO 
GOLIOTH_DEBUG_LOG_LEVEL_DEBUG 
GOLIOTH_DEBUG_LOG_LEVEL_VERBOSE 

Definition at line 32 of file golioth_debug.h.

Function Documentation

◆ golioth_debug_get_log_level()

enum golioth_debug_log_level golioth_debug_get_log_level ( void )

◆ golioth_debug_hexdump()

void golioth_debug_hexdump ( const char * tag,
const void * addr,
int len )

◆ golioth_debug_printf()

void golioth_debug_printf ( uint64_t tstamp_ms,
enum golioth_debug_log_level level,
const char * tag,
const char * format,
... )

◆ golioth_debug_set_client()

void golioth_debug_set_client ( struct golioth_client * client)

◆ golioth_debug_set_cloud_log_enabled()

void golioth_debug_set_cloud_log_enabled ( bool enable)

◆ golioth_debug_set_log_level()

void golioth_debug_set_log_level ( enum golioth_debug_log_level level)