21 #include "ly_config.h"
116 #define LY_LOLOG 0x01
118 #define LY_LOSTORE 0x02
120 #define LY_LOSTORE_LAST 0x06
135 LIBYANG_API_DECL uint32_t ly_log_options(uint32_t opts);
156 #define LY_LDGDICT 0x01
157 #define LY_LDGXPATH 0x02
158 #define LY_LDGDEPSETS 0x04
173 LIBYANG_API_DECL uint32_t ly_log_dbg_groups(uint32_t dbg_groups);
184 typedef void (*
ly_log_clb)(
LY_LOG_LEVEL level,
const char *msg,
const char *data_path,
const char *schema_path,
LIBYANG_API_DECL uint32_t * ly_temp_log_options(uint32_t *opts)
Set temporary thread-safe logger options overwriting those set by ly_log_options().
uint8_t ly_bool
Type to indicate boolean value.
LY_VECODE
libyang's codes of validation error. Whenever ly_errno is set to LY_EVALID, the ly_vecode is also set...
LIBYANG_API_DECL const char * ly_strvecode(LY_VECODE vecode)
Get human-readable error message for a validation error code.
LIBYANG_API_DECL void ly_set_log_clb(ly_log_clb clb)
Set logger callback.
Libyang full error structure.
LY_LOG_LEVEL
Verbosity levels of the libyang logger.
LIBYANG_API_DECL ly_log_clb ly_get_log_clb(void)
Get logger callback.
LIBYANG_API_DECL void ly_err_print(const struct ly_ctx *ctx, const struct ly_err_item *eitem)
Print the error structure as if just generated.
LIBYANG_API_DECL const char * ly_strerr(LY_ERR err)
Get human-readable error message for an error code.
struct ly_err_item * prev
LIBYANG_API_DECL LY_LOG_LEVEL ly_log_level(LY_LOG_LEVEL level)
Set logger verbosity level.
LIBYANG_API_DECL void ly_err_clean(struct ly_ctx *ctx, struct ly_err_item *eitem)
Free error structures from a context.
LIBYANG_API_DECL struct ly_err_item * ly_err_last(const struct ly_ctx *ctx)
Get the latest (thread, context-specific) generated error structure.
LIBYANG_API_DECL const char * ly_last_logmsg(void)
Get the last (thread-specific) full logged error message.
struct ly_err_item * next
void(* ly_log_clb)(LY_LOG_LEVEL level, const char *msg, const char *data_path, const char *schema_path, uint64_t line)
Logger callback.
LIBYANG_API_DECL struct ly_err_item * ly_err_first(const struct ly_ctx *ctx)
Get the first (thread, context-specific) generated error structure.
LY_ERR
libyang's error codes returned by the libyang functions.