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

@ -77,6 +77,9 @@ cat<<EOF > $cfile
#include <stdint.h>
#include <syslog.h> // debug
#include <clixon/clixon_queue.h>
#include <clixon/clixon_hash.h>
#include <clixon/clixon_handle.h>
#include <clixon/clixon_log.h> // debug
#include <clixon/clixon_client.h>
@ -89,12 +92,13 @@ main(int argc,
clixon_client_handle ch = NULL; /* clixon client handle */
int s;
clicon_log_init("client", LOG_DEBUG, CLICON_LOG_STDERR); // debug
clicon_debug_init($debug, NULL); // debug
/* Provide a clixon config-file, get a clixon handle */
if ((h = clixon_client_init("$cfg")) == NULL)
return -1;
clixon_log_init(h, "client", LOG_DEBUG, CLIXON_LOG_STDERR);
clixon_err_init(h);
clixon_debug_init(h, $debug, NULL);
/* Make a connection over netconf or ssh/netconf */
if ((ch = clixon_client_connect(h, CLIXON_CLIENT_NETCONF, NULL)) == NULL)
return -1;