Golioth Firmware SDK
Loading...
Searching...
No Matches
golioth_log

Functions

enum golioth_status golioth_log_error (struct golioth_client *client, const char *tag, const char *log_message, golioth_set_cb_fn callback, void *callback_arg)
 
enum golioth_status golioth_log_warn (struct golioth_client *client, const char *tag, const char *log_message, golioth_set_cb_fn callback, void *callback_arg)
 Same as golioth_log_error, but for warning level.
 
enum golioth_status golioth_log_info (struct golioth_client *client, const char *tag, const char *log_message, golioth_set_cb_fn callback, void *callback_arg)
 Same as golioth_log_error, but for info level.
 
enum golioth_status golioth_log_debug (struct golioth_client *client, const char *tag, const char *log_message, golioth_set_cb_fn callback, void *callback_arg)
 Same as golioth_log_error, but for debug level.
 

Detailed Description

Functions for logging messages to Golioth

https://docs.golioth.io/reference/protocols/coap/logging

Function Documentation

◆ golioth_log_debug()

enum golioth_status golioth_log_debug ( struct golioth_client * client,
const char * tag,
const char * log_message,
golioth_set_cb_fn callback,
void * callback_arg )

Same as golioth_log_error, but for debug level.

◆ golioth_log_error()

enum golioth_status golioth_log_error ( struct golioth_client * client,
const char * tag,
const char * log_message,
golioth_set_cb_fn callback,
void * callback_arg )

Log an error to Golioth

This function will enqueue a request and return immediately without waiting for a response from the server. The callback will be invoked when a response is received or a timeout occurs.

Parameters
clientThe client handle from golioth_client_create
tagA free-form string to identify/tag the message
log_messageString to log. Must be NULL-terminated.
callbackCallback to call on response received or timeout. Can be NULL.
callback_argCallback argument, passed directly when callback invoked. Can be NULL.

◆ golioth_log_info()

enum golioth_status golioth_log_info ( struct golioth_client * client,
const char * tag,
const char * log_message,
golioth_set_cb_fn callback,
void * callback_arg )

Same as golioth_log_error, but for info level.

◆ golioth_log_warn()

enum golioth_status golioth_log_warn ( struct golioth_client * client,
const char * tag,
const char * log_message,
golioth_set_cb_fn callback,
void * callback_arg )

Same as golioth_log_error, but for warning level.