log UPDATE input logging cleared and updated
diff --git a/tests/utests/basic/test_xml.c b/tests/utests/basic/test_xml.c
index efc8a61..668de4b 100644
--- a/tests/utests/basic/test_xml.c
+++ b/tests/utests/basic/test_xml.c
@@ -390,7 +390,7 @@
     /* empty value but in single quotes */
     assert_int_equal(LY_SUCCESS, ly_in_new_memory("=\'\'", &in));
     xmlctx->in = in;
-    LOG_LOCINIT(NULL, NULL, NULL, in);
+    LOG_LOCSET(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);
@@ -402,7 +402,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(NULL, NULL, NULL, in);
+    LOG_LOCSET(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);
@@ -414,7 +414,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(NULL, NULL, NULL, in);
+    LOG_LOCSET(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.");
@@ -422,7 +422,7 @@
 
     assert_int_equal(LY_SUCCESS, ly_in_new_memory("xxx", &in));
     xmlctx->in = in;
-    LOG_LOCINIT(NULL, NULL, NULL, in);
+    LOG_LOCSET(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.");
@@ -448,7 +448,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(NULL, NULL, NULL, in);
+    LOG_LOCSET(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);
@@ -460,7 +460,7 @@
     /* CDATA value */
     assert_int_equal(LY_SUCCESS, ly_in_new_memory(">   <![CDATA[    special non-escaped chars <>&\"'  ]]>  </a>", &in));
     xmlctx->in = in;
-    LOG_LOCINIT(NULL, NULL, NULL, in);
+    LOG_LOCSET(NULL, NULL, NULL, in);
     xmlctx->status = LYXML_ATTR_CONTENT;
     assert_int_equal(LY_SUCCESS, lyxml_ctx_next(xmlctx));
     assert_int_equal(LYXML_ELEM_CONTENT, xmlctx->status);
@@ -473,7 +473,7 @@
     /* invalid characters in string */
     assert_int_equal(LY_SUCCESS, ly_in_new_memory("=\'&#x52\'", &in));
     xmlctx->in = in;
-    LOG_LOCINIT(NULL, NULL, NULL, in);
+    LOG_LOCSET(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.");
@@ -481,7 +481,7 @@
 
     assert_int_equal(LY_SUCCESS, ly_in_new_memory("=\"&#82\"", &in));
     xmlctx->in = in;
-    LOG_LOCINIT(NULL, NULL, NULL, in);
+    LOG_LOCSET(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.");
@@ -489,7 +489,7 @@
 
     assert_int_equal(LY_SUCCESS, ly_in_new_memory("=\"&nonsense;\"", &in));
     xmlctx->in = in;
-    LOG_LOCINIT(NULL, NULL, NULL, in);
+    LOG_LOCSET(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.");
@@ -497,7 +497,7 @@
 
     assert_int_equal(LY_SUCCESS, ly_in_new_memory(">&#o122;", &in));
     xmlctx->in = in;
-    LOG_LOCINIT(NULL, NULL, NULL, in);
+    LOG_LOCSET(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.");
@@ -505,7 +505,7 @@
 
     assert_int_equal(LY_SUCCESS, ly_in_new_memory("=\'&#x06;\'", &in));
     xmlctx->in = in;
-    LOG_LOCINIT(NULL, NULL, NULL, in);
+    LOG_LOCSET(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.");
@@ -513,7 +513,7 @@
 
     assert_int_equal(LY_SUCCESS, ly_in_new_memory("=\'&#xfdd0;\'", &in));
     xmlctx->in = in;
-    LOG_LOCINIT(NULL, NULL, NULL, in);
+    LOG_LOCSET(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.");
@@ -521,7 +521,7 @@
 
     assert_int_equal(LY_SUCCESS, ly_in_new_memory("=\'&#xffff;\'", &in));
     xmlctx->in = in;
-    LOG_LOCINIT(NULL, NULL, NULL, in);
+    LOG_LOCSET(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/data/test_parser_json.c b/tests/utests/data/test_parser_json.c
index 3dd5eb4..a33416f 100644
--- a/tests/utests/data/test_parser_json.c
+++ b/tests/utests/data/test_parser_json.c
@@ -555,7 +555,7 @@
     /* invalid metadata */
     data = "{\"@a:foo\":\"str\",\"@a:foo3\":1,\"a:foo3\":2}";
     PARSER_CHECK_ERROR(data, 0, LYD_VALIDATE_PRESENT, tree, LY_EVALID,
-            "Unknown module of node \"@a:foo\".", "Data location \"/@a:foo\", line number 1.");
+            "Unknown module of node \"@a:foo\".", "Data location \"/@a:foo\".");
 
     /* empty name */
     PARSER_CHECK_ERROR("{\"@a:foo\":{\"\":0}}", 0, LYD_VALIDATE_PRESENT, tree, LY_EVALID,
diff --git a/tests/utests/extensions/test_schema_mount.c b/tests/utests/extensions/test_schema_mount.c
index ded8ce6..be879ec 100644
--- a/tests/utests/extensions/test_schema_mount.c
+++ b/tests/utests/extensions/test_schema_mount.c
@@ -297,9 +297,11 @@
             "  <module-set-id>1</module-set-id>"
             "</modules-state>");
     CHECK_PARSE_LYD_PARAM(xml, LYD_XML, LYD_PARSE_STRICT, LYD_VALIDATE_PRESENT, LY_EVALID, data);
-    CHECK_LOG_CTX("Node \"interfaces\" not found as a child of \"root\" node.", "Line number 1.");
+    CHECK_LOG_CTX("Node \"interfaces\" not found as a child of \"root\" node.",
+            "Data location \"/sm:root\", line number 1.");
     CHECK_PARSE_LYD_PARAM(json, LYD_JSON, LYD_PARSE_STRICT, LYD_VALIDATE_PRESENT, LY_EVALID, data);
-    CHECK_LOG_CTX("Node \"interfaces\" not found as a child of \"root\" node.", "Line number 1.");
+    CHECK_LOG_CTX("Node \"interfaces\" not found as a child of \"root\" node.",
+            "Data location \"/sm:root\", line number 1.");
 
     /* missing module in yang-library data */
     ly_ctx_set_ext_data_clb(UTEST_LYCTX, test_ext_data_clb,
@@ -338,9 +340,11 @@
             "  </mount-point>"
             "</schema-mounts>");
     CHECK_PARSE_LYD_PARAM(xml, LYD_XML, LYD_PARSE_STRICT, LYD_VALIDATE_PRESENT, LY_EVALID, data);
-    CHECK_LOG_CTX("Node \"interfaces\" not found as a child of \"root\" node.", NULL);
+    CHECK_LOG_CTX("Node \"interfaces\" not found as a child of \"root\" node.",
+            "Data location \"/sm:root\", line number 1.");
     CHECK_PARSE_LYD_PARAM(json, LYD_JSON, LYD_PARSE_STRICT, LYD_VALIDATE_PRESENT, LY_EVALID, data);
-    CHECK_LOG_CTX("Node \"interfaces\" not found as a child of \"root\" node.", NULL);
+    CHECK_LOG_CTX("Node \"interfaces\" not found as a child of \"root\" node.",
+            "Data location \"/sm:root\", line number 1.");
 
     /* callback data correct, invalid YANG data */
     ly_ctx_set_ext_data_clb(UTEST_LYCTX, test_ext_data_clb,
@@ -1155,7 +1159,7 @@
     CHECK_PARSE_LYD_PARAM(json, LYD_JSON, LYD_PARSE_STRICT, LYD_VALIDATE_PRESENT, LY_EVALID, data);
     CHECK_LOG_CTX("Ext plugin \"ly2 schema mount v1\": "
             "Invalid leafref value \"target-value\" - no target instance \"/sm:target\" with the same value.",
-            "Data location \"/ietf-interfaces:interfaces/interface[name='bu']/sm:sm-name\", line number 18.");
+            "Data location \"/ietf-interfaces:interfaces/interface[name='bu']/sm:sm-name\".");
 
     /* success */
     xml =
diff --git a/tests/utests/node/list.c b/tests/utests/node/list.c
index f89c56a..8b14ece 100644
--- a/tests/utests/node/list.c
+++ b/tests/utests/node/list.c
@@ -1205,7 +1205,7 @@
     CHECK_PARSE_LYD_PARAM(data, LYD_JSON, 0, LYD_VALIDATE_PRESENT, LY_EVALID, tree);
     assert_null(tree);
     CHECK_LOG_CTX("Duplicate instance of \"user\".",
-            "Data location \"/T0:user[uid='0']\", line number 1.");
+            "Data location \"/T0:user[uid='0']\".");
 
     data =
             "{\"T0:user\": ["
@@ -1215,7 +1215,7 @@
     CHECK_PARSE_LYD_PARAM(data, LYD_JSON, 0, LYD_VALIDATE_PRESENT, LY_EVALID, tree);
     assert_null(tree);
     CHECK_LOG_CTX("Unique data leaf(s) \"name group\" not satisfied in \"/T0:user[uid='0']\" and \"/T0:user[uid='1']\".",
-            "Data location \"/T0:user[uid='1']\", line number 1.");
+            "Data location \"/T0:user[uid='1']\".");
 
     /* double key */
     schema = MODULE_CREATE_YANG("T1", "list user {"
@@ -1265,7 +1265,7 @@
     CHECK_PARSE_LYD_PARAM(data, LYD_JSON, 0, LYD_VALIDATE_PRESENT, LY_EVALID, tree);
     assert_null(tree);
     CHECK_LOG_CTX("Duplicate instance of \"user\".",
-            "Data location \"/T1:user[uid='0'][group='User']\", line number 1.");
+            "Data location \"/T1:user[uid='0'][group='User']\".");
 
     /* min elements max elements */
     schema = MODULE_CREATE_YANG("T2",
@@ -1353,7 +1353,7 @@
     CHECK_PARSE_LYD_PARAM(data, LYD_JSON, 0, LYD_VALIDATE_PRESENT, LY_EVALID, tree);
     assert_null(tree);
     CHECK_LOG_CTX("Too few \"user\" instances.",
-            "Schema location \"/T2:user\", line number 1.");
+            "Schema location \"/T2:user\".");
 
     data =
             "{\"T2:user\": ["
@@ -1367,7 +1367,7 @@
     CHECK_PARSE_LYD_PARAM(data, LYD_JSON, 0, LYD_VALIDATE_PRESENT, LY_EVALID, tree);
     assert_null(tree);
     CHECK_LOG_CTX("Too many \"user\" instances.",
-            "Data location \"/T2:user[uid='5']\", line number 1.");
+            "Data location \"/T2:user[uid='5']\".");
 
     schema = MODULE_CREATE_YANG("T_EMPTY_LIST",
             "container user_list {"
diff --git a/tests/utests/schema/test_yang.c b/tests/utests/schema/test_yang.c
index 4f11500..4ce4dc4 100644
--- a/tests/utests/schema/test_yang.c
+++ b/tests/utests/schema/test_yang.c
@@ -90,7 +90,7 @@
     /* initilize and use the global easily available and customizable input handler */
     in.line = 1;
     YCTX->in = &in;
-    LOG_LOCINIT(NULL, NULL, NULL, &in);
+    LOG_LOCSET(NULL, NULL, NULL, &in);
 
     fctx.ctx = PARSER_CTX(YCTX);
     fctx.mod = pmod->mod;