log UPDATE return previous temp log opts
diff --git a/src/log.c b/src/log.c
index 41c8e90..f66873d 100644
--- a/src/log.c
+++ b/src/log.c
@@ -409,10 +409,14 @@
     return prev;
 }
 
-LIBYANG_API_DEF void
+LIBYANG_API_DEF uint32_t *
 ly_temp_log_options(uint32_t *opts)
 {
+    uint32_t *prev_lo = temp_ly_log_opts;
+
     temp_ly_log_opts = opts;
+
+    return prev_lo;
 }
 
 LIBYANG_API_DEF uint32_t