libyang REFACTOR avoid connection between context and log location storage

libyang works strictly with a single context now, so it is not necessary
to connect the log location information with a specific context. It also
clarifies what to do when the context is not available in the function
but still a location information in an error message could be useful.
diff --git a/tests/utests/basic/test_xml.c b/tests/utests/basic/test_xml.c
index 9c9c62a..aa13893 100644
--- a/tests/utests/basic/test_xml.c
+++ b/tests/utests/basic/test_xml.c
@@ -377,7 +377,7 @@
     /* empty value but in single quotes */
     assert_int_equal(LY_SUCCESS, ly_in_new_memory("=\'\'", &in));
     xmlctx->in = in;
-    LOG_LOCINIT(UTEST_LYCTX, NULL, NULL, NULL, in);
+    LOG_LOCINIT(NULL, NULL, NULL, in);
     xmlctx->status = LYXML_ATTRIBUTE;
     assert_int_equal(LY_SUCCESS, lyxml_ctx_next(xmlctx));
     assert_int_equal(LYXML_ATTR_CONTENT, xmlctx->status);
@@ -389,7 +389,7 @@
     /* empty element content - only formating before defining child */
     assert_int_equal(LY_SUCCESS, ly_in_new_memory(">\n  <y>", &in));
     xmlctx->in = in;
-    LOG_LOCINIT(UTEST_LYCTX, NULL, NULL, NULL, in);
+    LOG_LOCINIT(NULL, NULL, NULL, in);
     xmlctx->status = LYXML_ELEMENT;
     assert_int_equal(LY_SUCCESS, lyxml_ctx_next(xmlctx));
     assert_int_equal(LYXML_ELEM_CONTENT, xmlctx->status);
@@ -401,7 +401,7 @@
     /* empty element content is invalid - missing content terminating character < */
     assert_int_equal(LY_SUCCESS, ly_in_new_memory("", &in));
     xmlctx->in = in;
-    LOG_LOCINIT(UTEST_LYCTX, NULL, NULL, NULL, in);
+    LOG_LOCINIT(NULL, NULL, NULL, in);
     xmlctx->status = LYXML_ELEM_CONTENT;
     assert_int_equal(LY_EVALID, lyxml_ctx_next(xmlctx));
     CHECK_LOG_CTX("Unexpected end-of-input.", "Line number 1.");
@@ -409,7 +409,7 @@
 
     assert_int_equal(LY_SUCCESS, ly_in_new_memory("xxx", &in));
     xmlctx->in = in;
-    LOG_LOCINIT(UTEST_LYCTX, NULL, NULL, NULL, in);
+    LOG_LOCINIT(NULL, NULL, NULL, in);
     xmlctx->status = LYXML_ELEM_CONTENT;
     assert_int_equal(LY_EVALID, lyxml_ctx_next(xmlctx));
     CHECK_LOG_CTX("Invalid character sequence \"xxx\", expected element tag start ('<').", "Line number 1.");
@@ -434,7 +434,7 @@
     /* test using n-bytes UTF8 hexadecimal code points */
     assert_int_equal(LY_SUCCESS, ly_in_new_memory("=\'&#x0024;&#x00A2;&#x20ac;&#x10348;\'", &in));
     xmlctx->in = in;
-    LOG_LOCINIT(UTEST_LYCTX, NULL, NULL, NULL, in);
+    LOG_LOCINIT(NULL, NULL, NULL, in);
     xmlctx->status = LYXML_ATTRIBUTE;
     assert_int_equal(LY_SUCCESS, lyxml_ctx_next(xmlctx));
     assert_int_equal(LYXML_ATTR_CONTENT, xmlctx->status);
@@ -447,7 +447,7 @@
     /* invalid characters in string */
     assert_int_equal(LY_SUCCESS, ly_in_new_memory("=\'&#x52\'", &in));
     xmlctx->in = in;
-    LOG_LOCINIT(UTEST_LYCTX, NULL, NULL, NULL, in);
+    LOG_LOCINIT(NULL, NULL, NULL, in);
     xmlctx->status = LYXML_ATTRIBUTE;
     assert_int_equal(LY_EVALID, lyxml_ctx_next(xmlctx));
     CHECK_LOG_CTX("Invalid character sequence \"'\", expected ;.", "Line number 1.");
@@ -455,7 +455,7 @@
 
     assert_int_equal(LY_SUCCESS, ly_in_new_memory("=\"&#82\"", &in));
     xmlctx->in = in;
-    LOG_LOCINIT(UTEST_LYCTX, NULL, NULL, NULL, in);
+    LOG_LOCINIT(NULL, NULL, NULL, in);
     xmlctx->status = LYXML_ATTRIBUTE;
     assert_int_equal(LY_EVALID, lyxml_ctx_next(xmlctx));
     CHECK_LOG_CTX("Invalid character sequence \"\"\", expected ;.", "Line number 1.");
@@ -463,7 +463,7 @@
 
     assert_int_equal(LY_SUCCESS, ly_in_new_memory("=\"&nonsense;\"", &in));
     xmlctx->in = in;
-    LOG_LOCINIT(UTEST_LYCTX, NULL, NULL, NULL, in);
+    LOG_LOCINIT(NULL, NULL, NULL, in);
     xmlctx->status = LYXML_ATTRIBUTE;
     assert_int_equal(LY_EVALID, lyxml_ctx_next(xmlctx));
     CHECK_LOG_CTX("Entity reference \"&nonsense;\" not supported, only predefined references allowed.", "Line number 1.");
@@ -471,7 +471,7 @@
 
     assert_int_equal(LY_SUCCESS, ly_in_new_memory(">&#o122;", &in));
     xmlctx->in = in;
-    LOG_LOCINIT(UTEST_LYCTX, NULL, NULL, NULL, in);
+    LOG_LOCINIT(NULL, NULL, NULL, in);
     xmlctx->status = LYXML_ELEMENT;
     assert_int_equal(LY_EVALID, lyxml_ctx_next(xmlctx));
     CHECK_LOG_CTX("Invalid character reference \"&#o122;\".", "Line number 1.");
@@ -479,7 +479,7 @@
 
     assert_int_equal(LY_SUCCESS, ly_in_new_memory("=\'&#x06;\'", &in));
     xmlctx->in = in;
-    LOG_LOCINIT(UTEST_LYCTX, NULL, NULL, NULL, in);
+    LOG_LOCINIT(NULL, NULL, NULL, in);
     xmlctx->status = LYXML_ATTRIBUTE;
     assert_int_equal(LY_EVALID, lyxml_ctx_next(xmlctx));
     CHECK_LOG_CTX("Invalid character reference \"&#x06;\'\" (0x00000006).", "Line number 1.");
@@ -487,7 +487,7 @@
 
     assert_int_equal(LY_SUCCESS, ly_in_new_memory("=\'&#xfdd0;\'", &in));
     xmlctx->in = in;
-    LOG_LOCINIT(UTEST_LYCTX, NULL, NULL, NULL, in);
+    LOG_LOCINIT(NULL, NULL, NULL, in);
     xmlctx->status = LYXML_ATTRIBUTE;
     assert_int_equal(LY_EVALID, lyxml_ctx_next(xmlctx));
     CHECK_LOG_CTX("Invalid character reference \"&#xfdd0;\'\" (0x0000fdd0).", "Line number 1.");
@@ -495,7 +495,7 @@
 
     assert_int_equal(LY_SUCCESS, ly_in_new_memory("=\'&#xffff;\'", &in));
     xmlctx->in = in;
-    LOG_LOCINIT(UTEST_LYCTX, NULL, NULL, NULL, in);
+    LOG_LOCINIT(NULL, NULL, NULL, in);
     xmlctx->status = LYXML_ATTRIBUTE;
     assert_int_equal(LY_EVALID, lyxml_ctx_next(xmlctx));
     CHECK_LOG_CTX("Invalid character reference \"&#xffff;\'\" (0x0000ffff).", "Line number 1.");
diff --git a/tests/utests/schema/test_parser_yang.c b/tests/utests/schema/test_parser_yang.c
index 38e6e47..63af49d 100644
--- a/tests/utests/schema/test_parser_yang.c
+++ b/tests/utests/schema/test_parser_yang.c
@@ -93,7 +93,7 @@
     /* initilize and use the global easily available and customizable input handler */
     in.line = 1;
     YCTX->in = &in;
-    LOG_LOCINIT(UTEST_LYCTX, NULL, NULL, NULL, &in);
+    LOG_LOCINIT(NULL, NULL, NULL, &in);
 
     return 0;
 }
@@ -102,7 +102,7 @@
 teardown(void **state)
 {
     lys_module_free(YCTX->parsed_mod->mod, NULL);
-    LOG_LOCBACK(UTEST_LYCTX, 0, 0, 0, 1);
+    LOG_LOCBACK(0, 0, 0, 1);
 
     free(YCTX);
     YCTX = NULL;
@@ -693,7 +693,7 @@
     CHECK_LOG_CTX("Prefix \"y\" already used to import \"zzz\" module.", "Line number 1.");
 
     mod = mod_renew(YCTX);
-    LOG_LOCBACK(UTEST_LYCTX, 0, 0, 0, 1);
+    LOG_LOCBACK(0, 0, 0, 1);
 
     in.current = "module name10 {yang-version 1.1;namespace urn:x;prefix \"x\";import zzz {prefix y;}import zzz {prefix z;}}";
     assert_int_equal(lys_parse_mem(YCTX->parsed_mod->mod->ctx, in.current, LYS_IN_YANG, NULL), LY_SUCCESS);