Browse Source

srp_load: Turn off messages from libyang

Serj Kalichev 4 months ago
parent
commit
931f12f546
1 changed files with 5 additions and 0 deletions
  1. 5 0
      bin/srp_load.c

+ 5 - 0
bin/srp_load.c

@@ -8,6 +8,7 @@
 #include <faux/file.h>
 #include <faux/argv.h>
 
+#include <libyang/log.h>
 #include <sysrepo.h>
 #include <sysrepo/xpath.h>
 
@@ -67,6 +68,10 @@ int main(int argc, char **argv)
 	if (cmd_opts->cfg)
 		pline_opts_parse_file(cmd_opts->cfg, &opts);
 
+	// Turn off libyang warnings
+	ly_log_level(LY_LLERR);
+	ly_log_options(LY_LOSTORE);
+
 	// Prepare argv structure for current sysrepo path
 	if (cmd_opts->current_path) {
 		cur_path = faux_argv_new();