Restructured error,debug anf log API

Renamed functions clicon->clixon, replaced global variables w access functions
Unified clicon_netconf_error with clixon_err()
This commit is contained in:
Olof hagsand 2023-11-13 10:12:52 +01:00
parent 261469be16
commit 24a4991ec8
199 changed files with 4668 additions and 4158 deletions

View file

@ -76,7 +76,7 @@
/* typecast macro */
#define _IF ((clixon_yang_sub_parse_yacc *)_if)
#define _YYERROR(msg) {clicon_err(OE_YANG, 0, "%s", (msg)); YYERROR;}
#define _YYERROR(msg) {clixon_err(OE_YANG, 0, "%s", (msg)); YYERROR;}
#include <stdio.h>
#include <stdint.h>
@ -89,13 +89,14 @@
/* cligen */
#include <cligen/cligen.h>
/* clicon */
#include "clixon_err.h"
#include "clixon_log.h"
/* clixon */
#include "clixon_queue.h"
#include "clixon_hash.h"
#include "clixon_string.h"
#include "clixon_handle.h"
#include "clixon_err.h"
#include "clixon_log.h"
#include "clixon_debug.h"
#include "clixon_yang.h"
#include "clixon_xml.h"
#include "clixon_yang_module.h"
@ -116,7 +117,7 @@ clixon_yang_sub_parseerror(void *arg,
{
clixon_yang_sub_parse_yacc *ife = (clixon_yang_sub_parse_yacc *)arg;
clicon_err_fn(NULL, 0, OE_YANG, 0, "yang_sub_parse: file:%s:%d \"%s\" %s: at or before: %s",
clixon_err_fn(NULL, 0, OE_YANG, 0, "yang_sub_parse: file:%s:%d \"%s\" %s: at or before: %s",
ife->if_mainfile,
ife->if_linenum,
ife->if_parse_string,
@ -157,7 +158,7 @@ if_feature_check(clixon_yang_sub_parse_yacc *ife,
goto done;
/* Check if feature exists, and is set, otherwise remove */
if ((yfeat = yang_find(ymod, Y_FEATURE, feature)) == NULL){
clicon_err(OE_YANG, EINVAL, "Yang module %s has IF_FEATURE %s, but no such FEATURE statement exists",
clixon_err(OE_YANG, EINVAL, "Yang module %s has IF_FEATURE %s, but no such FEATURE statement exists",
ymod?yang_argument_get(ymod):"none",
feature);
goto done;