#ifndef __CONNMAN_LOG_H
#define __CONNMAN_LOG_H
+#if defined TIZEN_EXT
+#include <stdbool.h>
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
__FILE__, __FUNCTION__ , ## arg); \
} while (0)
+#if defined TIZEN_EXT
+#define simplified_log get_simple_log_option()
+bool get_simple_log_option(void);
+void set_simple_log_option(bool option);
+void set_dlog_logging_option(bool option);
+void set_file_logging_option(bool option);
+#endif
+
#ifdef __cplusplus
}
#endif
void __connman_util_cleanup(void);
#ifdef TIZEN_EXT
-__attribute__ ((unused)) static bool dlog_logging = true;
-__attribute__ ((unused)) static bool file_logging = true;
-__attribute__ ((unused)) static bool simplified_log = true;
__attribute__ ((unused)) static int __tizentvextension = -1;
#define TIZEN_TV_EXT (__builtin_expect(__tizentvextension != -1, 1) ? \
__tizentvextension : \
#if defined TIZEN_EXT
#include <sys/stat.h>
#include <sys/time.h>
+#include <stdbool.h>
#include <dlog.h>
#undef LOG_TAG
#define syslog __connman_log_s
static FILE *log_file = NULL;
+static bool dlog_logging = true;
+static bool file_logging = true;
+static bool simple_log = true;
+
+bool get_simple_log_option(void)
+{
+ return simple_log;
+}
+
+void set_simple_log_option(bool option)
+{
+ simple_log = option;
+}
+
+void set_dlog_logging_option(bool option)
+{
+ dlog_logging = option;
+}
+
+void set_file_logging_option(bool option)
+{
+ file_logging = option;
+}
void __connman_log_open(const char *ident, int option, int facility)
{
char *def_wifi_ifname;
bool file_log;
bool dlog_log;
- bool simplified_log;
+ bool simple_log;
#endif
} connman_settings = {
.bg_scan = true,
.def_wifi_ifname = DEFAULT_WIFI_INTERFACE,
.file_log = true,
.dlog_log = true,
- .simplified_log = true,
+ .simple_log = true,
#endif
};
boolean = __connman_config_get_bool(config, "General",
CONF_CONNMAN_SIMPLIFIED_LOG, &error);
if (!error)
- connman_settings.simplified_log = boolean;
+ connman_settings.simple_log = boolean;
g_clear_error(&error);
parse_config(config);
if (config)
g_key_file_free(config);
+
#if defined TIZEN_EXT
- dlog_logging = connman_settings.dlog_log;
- file_logging = connman_settings.file_log;
- simplified_log = connman_settings.simplified_log;
+ set_simple_log_option(connman_settings.simple_log);
+ set_dlog_logging_option(connman_settings.dlog_log);
+ set_file_logging_option(connman_settings.file_log);
#endif
return 0;
}
return connman_settings.dlog_log;
if (g_str_equal(key, CONF_CONNMAN_SIMPLIFIED_LOG))
- return connman_settings.simplified_log;
+ return connman_settings.simple_log;
#endif
#if defined TIZEN_EXT
if (ret == -ERANGE)
service_ext_save(service);
ret = __connman_config_provision_service(service);
- if (ret < 0 && simplified_log)
+ if (ret < 0 && !simplified_log)
DBG("Failed to provision service");
#else
if (__connman_config_provision_service(service) < 0)