浏览代码

srp_load: Turn off messages from libyang

Serj Kalichev 5 月之前
父节点
当前提交
931f12f546
共有 1 个文件被更改,包括 5 次插入0 次删除
  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();