Hybrid mode config: only use for Android Logger backend 40/232440/3
authorMichal Bloch <m.bloch@samsung.com>
Mon, 4 May 2020 10:49:54 +0000 (12:49 +0200)
committerHyotaek Shim <hyotaek.shim@samsung.com>
Thu, 7 May 2020 07:58:28 +0000 (07:58 +0000)
Change-Id: Ifaac28dd807262cc27d0b46f9bffa56e734085f3
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
configs/25-logger.conf
configs/dlog.conf
src/logger/logger.c

index 05abc3d..deb2508 100644 (file)
@@ -29,3 +29,11 @@ logger_dev_throttling=100
 # taking precedence over the default
 #logger_dev_throttling_radio=1000
 #logger_dev_throttling_main=80
+
+# How long after start the daemon works in "lazy" mode, which means that it
+# wakes up exactly after specified time (unlike regular polling, where it
+# might wake up immediately if logs are available). This reduces the overhead
+# for waking up, but can result in log loss under heavy load. Use -1 as the
+# total time to keep the daemon in the lazy mode permanently. Defaults to 0.
+lazy_polling_total_ms=-1
+lazy_polling_sleep_ms=1000
index 524b39a..b150cfc 100644 (file)
@@ -74,14 +74,6 @@ handle_kmsg=1
 # for continuous dlogutil instances.
 epoll_time_ms=1000
 
-# How long after start the daemon works in "lazy" mode, which means that it
-# wakes up exactly after specified time (unlike regular polling, where it
-# might wake up immediately if logs are available). This reduces the overhead
-# for waking up, but can result in log loss under heavy load. Use -1 as the
-# total time to keep the daemon in the lazy mode permanently.
-lazy_polling_total_ms=-1
-lazy_polling_sleep_ms=1000
-
 # Syslog handling currently disabled in the daemon - not needed in Tizen.
 #dlog_logger_conf_syslog=dlogutil -b syslog -r 256 -n 1 -f /var/log/dlog/syslog -v recv_realtime
 
index ea29622..2cdd3d7 100644 (file)
@@ -2131,6 +2131,12 @@ int prepare_config_data(struct logger_config_data *data)
                        data->is_buffer_enabled[LOG_ID_SYSTEM] =
                        data->is_buffer_enabled[LOG_ID_APPS] = 1;
                g_backend.reader_init = reader_init_for_pipe;
+
+               if (data->lazy_polling_total != 0) {
+                       printf("WARNING: 'lazy_polling_total_ms' config field ignored.\n"
+                              "It is only supported for Android Logger backend!\n");
+                       data->lazy_polling_total = 0;
+               }
        } else if (!strcmp(backend, "logger")) {
                g_backend.reader_init = reader_init_for_logger;
                for (log_id_t buf_id = 0; buf_id < LOG_ID_MAX; ++buf_id) {