Apply consistent log messages. 09/200209/1
authorYunmi Ha <yunmi.ha@samsung.com>
Wed, 20 Feb 2019 05:51:07 +0000 (14:51 +0900)
committerYunmi Ha <yunmi.ha@samsung.com>
Wed, 20 Feb 2019 05:51:07 +0000 (14:51 +0900)
1. First letter to uppercase.
2. Period at the end.
3. Rearrange parameters.

Change-Id: I8d037b3c7001ad9a41262a30f47cdf05332949d1
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
12 files changed:
plugins/iot/display/ambient-mode.c
plugins/iot/display/auto-brightness.c [changed mode: 0644->0755]
plugins/mobile/display/ambient-mode.c [changed mode: 0644->0755]
plugins/mobile/display/auto-brightness.c [changed mode: 0644->0755]
plugins/tv/display/ambient-mode.c [changed mode: 0644->0755]
plugins/tv/display/auto-brightness.c [changed mode: 0644->0755]
plugins/wearable/display/ambient-mode.c [changed mode: 0644->0755]
plugins/wearable/display/auto-brightness.c [changed mode: 0644->0755]
src/apps/apps.c [changed mode: 0644->0755]
src/auto-test/battery.c [changed mode: 0644->0755]
src/battery/battery-time.c [changed mode: 0644->0755]
src/power/boot.c [changed mode: 0644->0755]

index 7afecc2..72ce1a2 100644 (file)
@@ -64,12 +64,12 @@ static void ambient_set_condition(keynode_t *key_nodes, void *data)
        int state;
 
        if (key_nodes == NULL) {
-               _E("wrong parameter, key_nodes is null");
+               _E("Wrong parameter, key_nodes is null.");
                return;
        }
 
        ambient_condition = vconf_keynode_get_bool(key_nodes);
-       _I("ambient mode condition is %d", ambient_condition);
+       _I("Ambient mode condition is %d.", ambient_condition);
 
        state = (ambient_condition == 0 ? 0 : 1);
        device_notify(DEVICE_NOTIFIER_DISPLAY_AMBIENT_CONDITION, (void *)&state);
@@ -89,7 +89,7 @@ int ambient_set_state(int on)
        if (!on)
                ambient_pid = 0;
 
-       _D("AMBIENT is %s", (on ? ON : OFF));
+       _D("AMBIENT is %s.", (on ? ON : OFF));
 
        ambient_state = on;
 
@@ -115,7 +115,7 @@ void ambient_check_invalid_state(pid_t pid)
        if (ambient_get_state() == false)
                return;
 
-       _E("Invalid state! Ambient state is change to off!");
+       _E("Invalid state. Ambient state is change to off.");
 
        /* If lcd_power is on and ambient state is true
         * when pm state is changed to sleep,
@@ -156,7 +156,7 @@ static void end_clock(pid_t pid)
                update_count = 1;
        ambient_pid = pid;
 
-       _I("enter real ambient state by %d",
+       _I("Enter real ambient state by process(%d).",
            ambient_pid);
 }
 
@@ -180,10 +180,10 @@ static void ambient_init(void *data)
        ret = vconf_get_bool(VCONFKEY_SETAPPL_AMBIENT_MODE_BOOL,
            &ambient_condition);
        if (ret < 0) {
-               _E("Failed to get ambient mode condition ! (%d)", ret);
+               _E("Failed to get ambient mode condition: %d", ret);
                ambient_condition = false;
        }
-       _I("ambient mode condition is %d", ambient_condition);
+       _I("Ambient mode condition is %d.", ambient_condition);
 
        vconf_notify_key_changed(VCONFKEY_SETAPPL_AMBIENT_MODE_BOOL,
            ambient_set_condition, NULL);
old mode 100644 (file)
new mode 100755 (executable)
index 0a36de1..484e4fd
@@ -85,7 +85,7 @@ static bool update_working_position(void)
 
        ret = sensor_listener_read_data(accel_listener, &data);
        if (ret != SENSOR_ERROR_NONE) {
-               _E("Fail to get accelerometer data! %d", ret);
+               _E("Failed to get accelerometer data: %d", ret);
                return true;
        }
 
@@ -96,7 +96,7 @@ static bool update_working_position(void)
        realg = (float)sqrt((x * x) + (y * y) + (z * z));
        pitch = ROTATION_90 - abs((int) (asin(z / realg) * RADIAN_VALUE));
 
-       _D("accel data [%f, %f, %f] - %f", x, y, z, pitch);
+       _D("Accel data x=%f y=%f z=%f pitch=%f", x, y, z, pitch);
 
        if (pitch >= WORKING_ANGLE_MIN && pitch <= WORKING_ANGLE_MAX)
                return true;
@@ -110,7 +110,7 @@ static void alc_set_brightness(int setting, int value, float light)
 
        ret = backlight_ops.get_brightness(&tmp_value);
        if (ret < 0) {
-               _E("Fail to get display brightness!");
+               _E("Failed to get display brightness.");
                return;
        }
 
@@ -123,7 +123,7 @@ static void alc_set_brightness(int setting, int value, float light)
                        position = update_working_position();
                        if (!position && (old > light)) {
                                _D("It's not working position, "
-                                   "LCD isn't getting dark!");
+                                   "LCD isn't getting dark.");
                                return;
                        }
                }
@@ -148,8 +148,8 @@ static void alc_set_brightness(int setting, int value, float light)
                        backlight_ops.set_default_brt(tmp_value);
                        backlight_ops.update();
                }
-               _I("load light data:%f ,auto brt %d,min brightness %d,"
-                   "brightness %d", light, automatic_brt, min_brightness, value);
+               _I("Load light data(%f). auto brt=%d min brightness=%d "
+                   "brightness=%d", light, automatic_brt, min_brightness, value);
                old = light;
        }
 }
@@ -180,13 +180,13 @@ static bool alc_update_brt(bool setting)
 
        ret = sensor_listener_read_data(light_listener, &light_data);
        if (ret != SENSOR_ERROR_NONE) {
-               _E("Failed to read light sensor data(%d)", ret);
+               _E("Failed to read light sensor data: %d", ret);
                goto out;
        }
 
        index = light_data.value_count - 1;
        if (index < 0 || light_data.values[index] < 0) {
-               _E("Invalid light sensor data");
+               _E("Invalid light sensor data.");
                goto out;
        }
 
@@ -194,12 +194,12 @@ static bool alc_update_brt(bool setting)
        ret = backlight_ops.get_brightness_by_light_sensor(
                        lmax, lmin, light, &value);
        if (ret == -ENOTSUP) {
-               _E("Not supported to handle the light data");
+               _E("Not supported to handle the light data.");
                goto out;
        }
 
        if (ret < 0 || value < PM_MIN_BRIGHTNESS || value > PM_MAX_BRIGHTNESS) {
-               _E("fail to load light data : light(%f), value(%d), ret(%d)", light, value, ret);
+               _E("Failed to load light data. light=%f value=%d: %d", light, value, ret);
                goto out;
        }
 
@@ -224,7 +224,7 @@ out:
                }
                vconf_set_int(VCONFKEY_SETAPPL_BRIGHTNESS_AUTOMATIC_INT,
                    SETTING_BRIGHTNESS_AUTOMATIC_OFF);
-               _E("Fault counts is over %d, disable automatic brightness", MAX_FAULT);
+               _E("Fault counts is over %d, disable automatic brightness.", MAX_FAULT);
                return false;
        }
        return true;
@@ -273,11 +273,11 @@ static int connect_sensor(void)
        sensor_h *list = NULL;
        int cnt = 0;
 
-       _I("connect with sensor fw");
+       _I("Connect with sensor fw.");
        /* light sensor */
        ret = sensor_get_sensor_list(SENSOR_LIGHT, &list, &cnt);
        if (ret != SENSOR_ERROR_NONE) {
-               _E("Failed to get light sensor list(%d)", ret);
+               _E("Failed to get light sensor list: %d", ret);
                goto error;
        }
 
@@ -293,25 +293,25 @@ static int connect_sensor(void)
 
        ret = sensor_get_min_range(sensor, &lmin);
        if (ret != SENSOR_ERROR_NONE) {
-               _E("Failed to get light sensor min range (%d)", ret);
+               _E("Failed to get light sensor min range: %d", ret);
                goto error;
        }
        ret = sensor_get_max_range(sensor, &lmax);
        if (ret != SENSOR_ERROR_NONE) {
-               _E("Failed to get light sensor max range (%d)", ret);
+               _E("Failed to get light sensor max range: %d", ret);
                goto error;
        }
-       _I("Light sensor min(%f), max(%f)", lmin, lmax);
+       _I("Light sensor min=%f max=%f", lmin, lmax);
 
        ret = sensor_create_listener(sensor, &light_listener);
        if (ret != SENSOR_ERROR_NONE) {
-               _E("Failed to create listener(light)!");
+               _E("Failed to create listener(light).");
                goto error;
        }
        sensor_listener_set_option(light_listener, SENSOR_OPTION_ALWAYS_ON);
        ret = sensor_listener_start(light_listener);
        if (ret != SENSOR_ERROR_NONE) {
-               _E("Failed to start light sensor!");
+               _E("Failed to start light sensor.");
                sensor_destroy_listener(light_listener);
                light_listener = 0;
                goto error;
@@ -323,18 +323,18 @@ static int connect_sensor(void)
        /* accelerometer sensor */
        ret = sensor_get_default_sensor(SENSOR_ACCELEROMETER, &sensor);
        if (ret != SENSOR_ERROR_NONE) {
-               _E("Failed to get default accel sensor!");
+               _E("Failed to get default accel sensor.");
                goto error;
        }
        ret = sensor_create_listener(&sensor, &accel_listener);
        if (ret != SENSOR_ERROR_NONE) {
-               _E("Failed to create listener(accel)!");
+               _E("Failed to create listener(accel).");
                goto error;
        }
        sensor_listener_set_option(accel_listener, SENSOR_OPTION_ALWAYS_ON);
        ret = sensor_listener_start(accel_listener);
        if (ret != SENSOR_ERROR_NONE) {
-               _E("Failed to start accel sensor!");
+               _E("Failed to start accel sensor.");
                sensor_destroy_listener(accel_listener);
                accel_listener = 0;
                goto error;
@@ -360,7 +360,7 @@ error:
 
 static int disconnect_sensor(void)
 {
-       _I("disconnect with sensor fw");
+       _I("Disconnect with sensor fw.");
        /* light sensor*/
        if (light_listener > 0) {
                sensor_listener_stop(light_listener);
@@ -391,8 +391,8 @@ void set_brightness_changed_state(void)
 {
        if (pm_status_flag & PWRSV_FLAG) {
                pm_status_flag |= BRTCH_FLAG;
-               _D("brightness changed in low battery,"
-                   "escape dim state (light)");
+               _D("Brightness changed in low battery,"
+                   "escape dim state (light).");
        }
 }
 
@@ -420,7 +420,7 @@ static int set_autobrightness_state(int status)
                    g_timeout_add_seconds(display_conf.lightsensor_interval,
                            alc_handler, NULL);
        } else if (status == SETTING_BRIGHTNESS_AUTOMATIC_PAUSE) {
-               _I("auto brightness paused!");
+               _I("Auto brightness paused.");
                disconnect_sensor();
        } else {
                disconnect_sensor();
@@ -429,7 +429,7 @@ static int set_autobrightness_state(int status)
 
                ret = get_setting_brightness(&default_brt);
                if (ret != 0 || (default_brt < PM_MIN_BRIGHTNESS || default_brt > PM_MAX_BRIGHTNESS)) {
-                       _I("fail to read vconf value for brightness");
+                       _I("Failed to read vconf value for brightness.");
                        brt = PM_DEFAULT_BRIGHTNESS;
                        if (default_brt < PM_MIN_BRIGHTNESS || default_brt > PM_MAX_BRIGHTNESS)
                                vconf_set_int(VCONFKEY_SETAPPL_LCD_BRIGHTNESS, brt);
@@ -448,7 +448,7 @@ static void set_alc_function(keynode_t *key_nodes, void *data)
        int status, ret;
 
        if (key_nodes == NULL) {
-               _E("wrong parameter, key_nodes is null");
+               _E("Wrong parameter, key_nodes is null.");
                return;
        }
 
@@ -459,21 +459,21 @@ static void set_alc_function(keynode_t *key_nodes, void *data)
        case SETTING_BRIGHTNESS_AUTOMATIC_ON:
        case SETTING_BRIGHTNESS_AUTOMATIC_PAUSE:
                ret = set_autobrightness_state(status);
-               _D("set auto brightness : %d", ret);
+               _D("Set auto brightness: %d", ret);
                break;
        default:
-               _E("invalid value! %d", status);
+               _E("Invalid value(%d)", status);
        }
 }
 
 static void set_alc_automatic_brt(keynode_t *key_nodes, void *data)
 {
        if (key_nodes == NULL) {
-               _E("wrong parameter, key_nodes is null");
+               _E("Wrong parameter, key_nodes is null.");
                return;
        }
        automatic_brt = vconf_keynode_get_int(key_nodes) / AUTOMATIC_DEVIDE_VAL;
-       _D("automatic brt : %d", automatic_brt);
+       _D("Automatic brt(%d)", automatic_brt);
 
        alc_update_brt(true);
 }
@@ -491,7 +491,7 @@ static gboolean update_handler(void *data)
        if (ret < 0 || on != SETTING_BRIGHTNESS_AUTOMATIC_ON)
                return G_SOURCE_REMOVE;
 
-       _D("auto brightness is working!");
+       _D("Auto brightness is working.");
        alc_update_brt(true);
 
        return G_SOURCE_REMOVE;
@@ -526,10 +526,10 @@ static int prepare_lsensor(void *data)
 
        vconf_get_int(VCONFKEY_SETAPPL_LCD_AUTOMATIC_BRIGHTNESS, &brt);
        if (brt < PM_MIN_BRIGHTNESS || brt > PM_MAX_BRIGHTNESS) {
-               _E("Failed to get automatic brightness!");
+               _E("Failed to get automatic brightness.");
        } else {
                automatic_brt = brt / AUTOMATIC_DEVIDE_VAL;
-               _I("automatic brt init success %d", automatic_brt);
+               _I("Automatic brt(%d) init success.", automatic_brt);
        }
 
        vconf_notify_key_changed(VCONFKEY_SETAPPL_LCD_AUTOMATIC_BRIGHTNESS,
@@ -565,7 +565,7 @@ static int set_autobrightness_min(int val, char *name)
 
        update_brightness_direct();
 
-       _I("auto brightness min value changed! (%d, %s)",
+       _I("Auto brightness min value changed. min_brightness=%d min_brightness_name=%s",
            min_brightness, min_brightness_name);
 
        return 0;
@@ -585,7 +585,7 @@ static void reset_autobrightness_min(GDBusConnection *conn,
        if (strcmp(sender, min_brightness_name))
                return;
 
-       _I("change to default %d -> %d, %s", min_brightness,
+       _I("Change to default min brightness. before=%d changed=%d brightness_name=%s", min_brightness,
            PM_MIN_BRIGHTNESS, min_brightness_name);
        min_brightness = PM_MIN_BRIGHTNESS;
        if (min_brightness_name) {
old mode 100644 (file)
new mode 100755 (executable)
index 7afecc2..72ce1a2
@@ -64,12 +64,12 @@ static void ambient_set_condition(keynode_t *key_nodes, void *data)
        int state;
 
        if (key_nodes == NULL) {
-               _E("wrong parameter, key_nodes is null");
+               _E("Wrong parameter, key_nodes is null.");
                return;
        }
 
        ambient_condition = vconf_keynode_get_bool(key_nodes);
-       _I("ambient mode condition is %d", ambient_condition);
+       _I("Ambient mode condition is %d.", ambient_condition);
 
        state = (ambient_condition == 0 ? 0 : 1);
        device_notify(DEVICE_NOTIFIER_DISPLAY_AMBIENT_CONDITION, (void *)&state);
@@ -89,7 +89,7 @@ int ambient_set_state(int on)
        if (!on)
                ambient_pid = 0;
 
-       _D("AMBIENT is %s", (on ? ON : OFF));
+       _D("AMBIENT is %s.", (on ? ON : OFF));
 
        ambient_state = on;
 
@@ -115,7 +115,7 @@ void ambient_check_invalid_state(pid_t pid)
        if (ambient_get_state() == false)
                return;
 
-       _E("Invalid state! Ambient state is change to off!");
+       _E("Invalid state. Ambient state is change to off.");
 
        /* If lcd_power is on and ambient state is true
         * when pm state is changed to sleep,
@@ -156,7 +156,7 @@ static void end_clock(pid_t pid)
                update_count = 1;
        ambient_pid = pid;
 
-       _I("enter real ambient state by %d",
+       _I("Enter real ambient state by process(%d).",
            ambient_pid);
 }
 
@@ -180,10 +180,10 @@ static void ambient_init(void *data)
        ret = vconf_get_bool(VCONFKEY_SETAPPL_AMBIENT_MODE_BOOL,
            &ambient_condition);
        if (ret < 0) {
-               _E("Failed to get ambient mode condition ! (%d)", ret);
+               _E("Failed to get ambient mode condition: %d", ret);
                ambient_condition = false;
        }
-       _I("ambient mode condition is %d", ambient_condition);
+       _I("Ambient mode condition is %d.", ambient_condition);
 
        vconf_notify_key_changed(VCONFKEY_SETAPPL_AMBIENT_MODE_BOOL,
            ambient_set_condition, NULL);
old mode 100644 (file)
new mode 100755 (executable)
index 0a36de1..6391a8e
@@ -85,7 +85,7 @@ static bool update_working_position(void)
 
        ret = sensor_listener_read_data(accel_listener, &data);
        if (ret != SENSOR_ERROR_NONE) {
-               _E("Fail to get accelerometer data! %d", ret);
+               _E("Failed to get accelerometer data: %d", ret);
                return true;
        }
 
@@ -96,7 +96,7 @@ static bool update_working_position(void)
        realg = (float)sqrt((x * x) + (y * y) + (z * z));
        pitch = ROTATION_90 - abs((int) (asin(z / realg) * RADIAN_VALUE));
 
-       _D("accel data [%f, %f, %f] - %f", x, y, z, pitch);
+       _D("Accel data x=%f y=%f z=%f pitch=%f", x, y, z, pitch);
 
        if (pitch >= WORKING_ANGLE_MIN && pitch <= WORKING_ANGLE_MAX)
                return true;
@@ -110,7 +110,7 @@ static void alc_set_brightness(int setting, int value, float light)
 
        ret = backlight_ops.get_brightness(&tmp_value);
        if (ret < 0) {
-               _E("Fail to get display brightness!");
+               _E("Failed to get display brightness.");
                return;
        }
 
@@ -123,7 +123,7 @@ static void alc_set_brightness(int setting, int value, float light)
                        position = update_working_position();
                        if (!position && (old > light)) {
                                _D("It's not working position, "
-                                   "LCD isn't getting dark!");
+                                   "LCD isn't getting dark.");
                                return;
                        }
                }
@@ -148,8 +148,8 @@ static void alc_set_brightness(int setting, int value, float light)
                        backlight_ops.set_default_brt(tmp_value);
                        backlight_ops.update();
                }
-               _I("load light data:%f ,auto brt %d,min brightness %d,"
-                   "brightness %d", light, automatic_brt, min_brightness, value);
+               _I("Load light data(%f) auto brt=%d min brightness=%d "
+                   "brightness=%d", light, automatic_brt, min_brightness, value);
                old = light;
        }
 }
@@ -180,13 +180,13 @@ static bool alc_update_brt(bool setting)
 
        ret = sensor_listener_read_data(light_listener, &light_data);
        if (ret != SENSOR_ERROR_NONE) {
-               _E("Failed to read light sensor data(%d)", ret);
+               _E("Failed to read light sensor data: %d", ret);
                goto out;
        }
 
        index = light_data.value_count - 1;
        if (index < 0 || light_data.values[index] < 0) {
-               _E("Invalid light sensor data");
+               _E("Invalid light sensor data.");
                goto out;
        }
 
@@ -194,12 +194,12 @@ static bool alc_update_brt(bool setting)
        ret = backlight_ops.get_brightness_by_light_sensor(
                        lmax, lmin, light, &value);
        if (ret == -ENOTSUP) {
-               _E("Not supported to handle the light data");
+               _E("Not supported to handle the light data.");
                goto out;
        }
 
        if (ret < 0 || value < PM_MIN_BRIGHTNESS || value > PM_MAX_BRIGHTNESS) {
-               _E("fail to load light data : light(%f), value(%d), ret(%d)", light, value, ret);
+               _E("Failed to load light data. light=%f value=%d: %d", light, value, ret);
                goto out;
        }
 
@@ -224,7 +224,7 @@ out:
                }
                vconf_set_int(VCONFKEY_SETAPPL_BRIGHTNESS_AUTOMATIC_INT,
                    SETTING_BRIGHTNESS_AUTOMATIC_OFF);
-               _E("Fault counts is over %d, disable automatic brightness", MAX_FAULT);
+               _E("Fault counts is over %d, disable automatic brightness.", MAX_FAULT);
                return false;
        }
        return true;
@@ -273,11 +273,11 @@ static int connect_sensor(void)
        sensor_h *list = NULL;
        int cnt = 0;
 
-       _I("connect with sensor fw");
+       _I("Connect with sensor fw.");
        /* light sensor */
        ret = sensor_get_sensor_list(SENSOR_LIGHT, &list, &cnt);
        if (ret != SENSOR_ERROR_NONE) {
-               _E("Failed to get light sensor list(%d)", ret);
+               _E("Failed to get light sensor list: %d", ret);
                goto error;
        }
 
@@ -293,25 +293,25 @@ static int connect_sensor(void)
 
        ret = sensor_get_min_range(sensor, &lmin);
        if (ret != SENSOR_ERROR_NONE) {
-               _E("Failed to get light sensor min range (%d)", ret);
+               _E("Failed to get light sensor min range: %d", ret);
                goto error;
        }
        ret = sensor_get_max_range(sensor, &lmax);
        if (ret != SENSOR_ERROR_NONE) {
-               _E("Failed to get light sensor max range (%d)", ret);
+               _E("Failed to get light sensor max range: %d", ret);
                goto error;
        }
-       _I("Light sensor min(%f), max(%f)", lmin, lmax);
+       _I("Light sensor min=%f max=%f", lmin, lmax);
 
        ret = sensor_create_listener(sensor, &light_listener);
        if (ret != SENSOR_ERROR_NONE) {
-               _E("Failed to create listener(light)!");
+               _E("Failed to create listener(light).");
                goto error;
        }
        sensor_listener_set_option(light_listener, SENSOR_OPTION_ALWAYS_ON);
        ret = sensor_listener_start(light_listener);
        if (ret != SENSOR_ERROR_NONE) {
-               _E("Failed to start light sensor!");
+               _E("Failed to start light sensor.");
                sensor_destroy_listener(light_listener);
                light_listener = 0;
                goto error;
@@ -323,18 +323,18 @@ static int connect_sensor(void)
        /* accelerometer sensor */
        ret = sensor_get_default_sensor(SENSOR_ACCELEROMETER, &sensor);
        if (ret != SENSOR_ERROR_NONE) {
-               _E("Failed to get default accel sensor!");
+               _E("Failed to get default accel sensor.");
                goto error;
        }
        ret = sensor_create_listener(&sensor, &accel_listener);
        if (ret != SENSOR_ERROR_NONE) {
-               _E("Failed to create listener(accel)!");
+               _E("Failed to create listener(accel).");
                goto error;
        }
        sensor_listener_set_option(accel_listener, SENSOR_OPTION_ALWAYS_ON);
        ret = sensor_listener_start(accel_listener);
        if (ret != SENSOR_ERROR_NONE) {
-               _E("Failed to start accel sensor!");
+               _E("Failed to start accel sensor.");
                sensor_destroy_listener(accel_listener);
                accel_listener = 0;
                goto error;
@@ -360,7 +360,7 @@ error:
 
 static int disconnect_sensor(void)
 {
-       _I("disconnect with sensor fw");
+       _I("Disconnect with sensor fw.");
        /* light sensor*/
        if (light_listener > 0) {
                sensor_listener_stop(light_listener);
@@ -391,8 +391,8 @@ void set_brightness_changed_state(void)
 {
        if (pm_status_flag & PWRSV_FLAG) {
                pm_status_flag |= BRTCH_FLAG;
-               _D("brightness changed in low battery,"
-                   "escape dim state (light)");
+               _D("Brightness changed in low battery,"
+                   "escape dim state (light).");
        }
 }
 
@@ -420,7 +420,7 @@ static int set_autobrightness_state(int status)
                    g_timeout_add_seconds(display_conf.lightsensor_interval,
                            alc_handler, NULL);
        } else if (status == SETTING_BRIGHTNESS_AUTOMATIC_PAUSE) {
-               _I("auto brightness paused!");
+               _I("Auto brightness paused.");
                disconnect_sensor();
        } else {
                disconnect_sensor();
@@ -429,7 +429,7 @@ static int set_autobrightness_state(int status)
 
                ret = get_setting_brightness(&default_brt);
                if (ret != 0 || (default_brt < PM_MIN_BRIGHTNESS || default_brt > PM_MAX_BRIGHTNESS)) {
-                       _I("fail to read vconf value for brightness");
+                       _I("Failed to read vconf value for brightness.");
                        brt = PM_DEFAULT_BRIGHTNESS;
                        if (default_brt < PM_MIN_BRIGHTNESS || default_brt > PM_MAX_BRIGHTNESS)
                                vconf_set_int(VCONFKEY_SETAPPL_LCD_BRIGHTNESS, brt);
@@ -448,7 +448,7 @@ static void set_alc_function(keynode_t *key_nodes, void *data)
        int status, ret;
 
        if (key_nodes == NULL) {
-               _E("wrong parameter, key_nodes is null");
+               _E("Wrong parameter, key_nodes is null.");
                return;
        }
 
@@ -459,21 +459,21 @@ static void set_alc_function(keynode_t *key_nodes, void *data)
        case SETTING_BRIGHTNESS_AUTOMATIC_ON:
        case SETTING_BRIGHTNESS_AUTOMATIC_PAUSE:
                ret = set_autobrightness_state(status);
-               _D("set auto brightness : %d", ret);
+               _D("Set auto brightness: %d", ret);
                break;
        default:
-               _E("invalid value! %d", status);
+               _E("Invalid value(%d)", status);
        }
 }
 
 static void set_alc_automatic_brt(keynode_t *key_nodes, void *data)
 {
        if (key_nodes == NULL) {
-               _E("wrong parameter, key_nodes is null");
+               _E("Wrong parameter, key_nodes is null.");
                return;
        }
        automatic_brt = vconf_keynode_get_int(key_nodes) / AUTOMATIC_DEVIDE_VAL;
-       _D("automatic brt : %d", automatic_brt);
+       _D("Automatic brt(%d)", automatic_brt);
 
        alc_update_brt(true);
 }
@@ -491,7 +491,7 @@ static gboolean update_handler(void *data)
        if (ret < 0 || on != SETTING_BRIGHTNESS_AUTOMATIC_ON)
                return G_SOURCE_REMOVE;
 
-       _D("auto brightness is working!");
+       _D("Auto brightness is working.");
        alc_update_brt(true);
 
        return G_SOURCE_REMOVE;
@@ -526,10 +526,10 @@ static int prepare_lsensor(void *data)
 
        vconf_get_int(VCONFKEY_SETAPPL_LCD_AUTOMATIC_BRIGHTNESS, &brt);
        if (brt < PM_MIN_BRIGHTNESS || brt > PM_MAX_BRIGHTNESS) {
-               _E("Failed to get automatic brightness!");
+               _E("Failed to get automatic brightness.");
        } else {
                automatic_brt = brt / AUTOMATIC_DEVIDE_VAL;
-               _I("automatic brt init success %d", automatic_brt);
+               _I("Automatic brt(%d) init success.", automatic_brt);
        }
 
        vconf_notify_key_changed(VCONFKEY_SETAPPL_LCD_AUTOMATIC_BRIGHTNESS,
@@ -565,7 +565,7 @@ static int set_autobrightness_min(int val, char *name)
 
        update_brightness_direct();
 
-       _I("auto brightness min value changed! (%d, %s)",
+       _I("Auto brightness min value changed. min_brightness=%d min_brightness_name=%s",
            min_brightness, min_brightness_name);
 
        return 0;
@@ -585,7 +585,7 @@ static void reset_autobrightness_min(GDBusConnection *conn,
        if (strcmp(sender, min_brightness_name))
                return;
 
-       _I("change to default %d -> %d, %s", min_brightness,
+       _I("Change to default min brightness. before=%d changed=%d brightness_name=%s", min_brightness,
            PM_MIN_BRIGHTNESS, min_brightness_name);
        min_brightness = PM_MIN_BRIGHTNESS;
        if (min_brightness_name) {
old mode 100644 (file)
new mode 100755 (executable)
index 7afecc2..72ce1a2
@@ -64,12 +64,12 @@ static void ambient_set_condition(keynode_t *key_nodes, void *data)
        int state;
 
        if (key_nodes == NULL) {
-               _E("wrong parameter, key_nodes is null");
+               _E("Wrong parameter, key_nodes is null.");
                return;
        }
 
        ambient_condition = vconf_keynode_get_bool(key_nodes);
-       _I("ambient mode condition is %d", ambient_condition);
+       _I("Ambient mode condition is %d.", ambient_condition);
 
        state = (ambient_condition == 0 ? 0 : 1);
        device_notify(DEVICE_NOTIFIER_DISPLAY_AMBIENT_CONDITION, (void *)&state);
@@ -89,7 +89,7 @@ int ambient_set_state(int on)
        if (!on)
                ambient_pid = 0;
 
-       _D("AMBIENT is %s", (on ? ON : OFF));
+       _D("AMBIENT is %s.", (on ? ON : OFF));
 
        ambient_state = on;
 
@@ -115,7 +115,7 @@ void ambient_check_invalid_state(pid_t pid)
        if (ambient_get_state() == false)
                return;
 
-       _E("Invalid state! Ambient state is change to off!");
+       _E("Invalid state. Ambient state is change to off.");
 
        /* If lcd_power is on and ambient state is true
         * when pm state is changed to sleep,
@@ -156,7 +156,7 @@ static void end_clock(pid_t pid)
                update_count = 1;
        ambient_pid = pid;
 
-       _I("enter real ambient state by %d",
+       _I("Enter real ambient state by process(%d).",
            ambient_pid);
 }
 
@@ -180,10 +180,10 @@ static void ambient_init(void *data)
        ret = vconf_get_bool(VCONFKEY_SETAPPL_AMBIENT_MODE_BOOL,
            &ambient_condition);
        if (ret < 0) {
-               _E("Failed to get ambient mode condition ! (%d)", ret);
+               _E("Failed to get ambient mode condition: %d", ret);
                ambient_condition = false;
        }
-       _I("ambient mode condition is %d", ambient_condition);
+       _I("Ambient mode condition is %d.", ambient_condition);
 
        vconf_notify_key_changed(VCONFKEY_SETAPPL_AMBIENT_MODE_BOOL,
            ambient_set_condition, NULL);
old mode 100644 (file)
new mode 100755 (executable)
index 0a36de1..0faa106
@@ -85,7 +85,7 @@ static bool update_working_position(void)
 
        ret = sensor_listener_read_data(accel_listener, &data);
        if (ret != SENSOR_ERROR_NONE) {
-               _E("Fail to get accelerometer data! %d", ret);
+               _E("Failed to get accelerometer data: %d", ret);
                return true;
        }
 
@@ -96,7 +96,7 @@ static bool update_working_position(void)
        realg = (float)sqrt((x * x) + (y * y) + (z * z));
        pitch = ROTATION_90 - abs((int) (asin(z / realg) * RADIAN_VALUE));
 
-       _D("accel data [%f, %f, %f] - %f", x, y, z, pitch);
+       _D("Accel data x=%f y=%f z=%f pitch=%f", x, y, z, pitch);
 
        if (pitch >= WORKING_ANGLE_MIN && pitch <= WORKING_ANGLE_MAX)
                return true;
@@ -110,7 +110,7 @@ static void alc_set_brightness(int setting, int value, float light)
 
        ret = backlight_ops.get_brightness(&tmp_value);
        if (ret < 0) {
-               _E("Fail to get display brightness!");
+               _E("Failed to get display brightness.");
                return;
        }
 
@@ -123,7 +123,7 @@ static void alc_set_brightness(int setting, int value, float light)
                        position = update_working_position();
                        if (!position && (old > light)) {
                                _D("It's not working position, "
-                                   "LCD isn't getting dark!");
+                                   "LCD isn't getting dark.");
                                return;
                        }
                }
@@ -148,8 +148,8 @@ static void alc_set_brightness(int setting, int value, float light)
                        backlight_ops.set_default_brt(tmp_value);
                        backlight_ops.update();
                }
-               _I("load light data:%f ,auto brt %d,min brightness %d,"
-                   "brightness %d", light, automatic_brt, min_brightness, value);
+               _I("Load light data(%f). auto brt=%d min brightness=%d "
+                   "brightness=%d", light, automatic_brt, min_brightness, value);
                old = light;
        }
 }
@@ -180,13 +180,13 @@ static bool alc_update_brt(bool setting)
 
        ret = sensor_listener_read_data(light_listener, &light_data);
        if (ret != SENSOR_ERROR_NONE) {
-               _E("Failed to read light sensor data(%d)", ret);
+               _E("Failed to read light sensor data: %d", ret);
                goto out;
        }
 
        index = light_data.value_count - 1;
        if (index < 0 || light_data.values[index] < 0) {
-               _E("Invalid light sensor data");
+               _E("Invalid light sensor data.");
                goto out;
        }
 
@@ -194,12 +194,12 @@ static bool alc_update_brt(bool setting)
        ret = backlight_ops.get_brightness_by_light_sensor(
                        lmax, lmin, light, &value);
        if (ret == -ENOTSUP) {
-               _E("Not supported to handle the light data");
+               _E("Not supported to handle the light data.");
                goto out;
        }
 
        if (ret < 0 || value < PM_MIN_BRIGHTNESS || value > PM_MAX_BRIGHTNESS) {
-               _E("fail to load light data : light(%f), value(%d), ret(%d)", light, value, ret);
+               _E("Failed to load light data. light=%f value=%d: %d", light, value, ret);
                goto out;
        }
 
@@ -224,7 +224,7 @@ out:
                }
                vconf_set_int(VCONFKEY_SETAPPL_BRIGHTNESS_AUTOMATIC_INT,
                    SETTING_BRIGHTNESS_AUTOMATIC_OFF);
-               _E("Fault counts is over %d, disable automatic brightness", MAX_FAULT);
+               _E("Fault counts is over %d, disable automatic brightness.", MAX_FAULT);
                return false;
        }
        return true;
@@ -273,11 +273,11 @@ static int connect_sensor(void)
        sensor_h *list = NULL;
        int cnt = 0;
 
-       _I("connect with sensor fw");
+       _I("Connect with sensor fw.");
        /* light sensor */
        ret = sensor_get_sensor_list(SENSOR_LIGHT, &list, &cnt);
        if (ret != SENSOR_ERROR_NONE) {
-               _E("Failed to get light sensor list(%d)", ret);
+               _E("Failed to get light sensor list: %d", ret);
                goto error;
        }
 
@@ -293,25 +293,25 @@ static int connect_sensor(void)
 
        ret = sensor_get_min_range(sensor, &lmin);
        if (ret != SENSOR_ERROR_NONE) {
-               _E("Failed to get light sensor min range (%d)", ret);
+               _E("Failed to get light sensor min range: %d", ret);
                goto error;
        }
        ret = sensor_get_max_range(sensor, &lmax);
        if (ret != SENSOR_ERROR_NONE) {
-               _E("Failed to get light sensor max range (%d)", ret);
+               _E("Failed to get light sensor max range: %d", ret);
                goto error;
        }
-       _I("Light sensor min(%f), max(%f)", lmin, lmax);
+       _I("Light sensor min=%f max=%f", lmin, lmax);
 
        ret = sensor_create_listener(sensor, &light_listener);
        if (ret != SENSOR_ERROR_NONE) {
-               _E("Failed to create listener(light)!");
+               _E("Failed to create listener(light).");
                goto error;
        }
        sensor_listener_set_option(light_listener, SENSOR_OPTION_ALWAYS_ON);
        ret = sensor_listener_start(light_listener);
        if (ret != SENSOR_ERROR_NONE) {
-               _E("Failed to start light sensor!");
+               _E("Failed to start light sensor.");
                sensor_destroy_listener(light_listener);
                light_listener = 0;
                goto error;
@@ -323,18 +323,18 @@ static int connect_sensor(void)
        /* accelerometer sensor */
        ret = sensor_get_default_sensor(SENSOR_ACCELEROMETER, &sensor);
        if (ret != SENSOR_ERROR_NONE) {
-               _E("Failed to get default accel sensor!");
+               _E("Failed to get default accel sensor.");
                goto error;
        }
        ret = sensor_create_listener(&sensor, &accel_listener);
        if (ret != SENSOR_ERROR_NONE) {
-               _E("Failed to create listener(accel)!");
+               _E("Failed to create listener(accel).");
                goto error;
        }
        sensor_listener_set_option(accel_listener, SENSOR_OPTION_ALWAYS_ON);
        ret = sensor_listener_start(accel_listener);
        if (ret != SENSOR_ERROR_NONE) {
-               _E("Failed to start accel sensor!");
+               _E("Failed to start accel sensor.");
                sensor_destroy_listener(accel_listener);
                accel_listener = 0;
                goto error;
@@ -360,7 +360,7 @@ error:
 
 static int disconnect_sensor(void)
 {
-       _I("disconnect with sensor fw");
+       _I("Disconnect with sensor fw.");
        /* light sensor*/
        if (light_listener > 0) {
                sensor_listener_stop(light_listener);
@@ -391,8 +391,8 @@ void set_brightness_changed_state(void)
 {
        if (pm_status_flag & PWRSV_FLAG) {
                pm_status_flag |= BRTCH_FLAG;
-               _D("brightness changed in low battery,"
-                   "escape dim state (light)");
+               _D("Brightness changed in low battery,"
+                   "escape dim state (light).");
        }
 }
 
@@ -420,7 +420,7 @@ static int set_autobrightness_state(int status)
                    g_timeout_add_seconds(display_conf.lightsensor_interval,
                            alc_handler, NULL);
        } else if (status == SETTING_BRIGHTNESS_AUTOMATIC_PAUSE) {
-               _I("auto brightness paused!");
+               _I("Auto brightness paused.");
                disconnect_sensor();
        } else {
                disconnect_sensor();
@@ -429,7 +429,7 @@ static int set_autobrightness_state(int status)
 
                ret = get_setting_brightness(&default_brt);
                if (ret != 0 || (default_brt < PM_MIN_BRIGHTNESS || default_brt > PM_MAX_BRIGHTNESS)) {
-                       _I("fail to read vconf value for brightness");
+                       _I("Failed to read vconf value for brightness.");
                        brt = PM_DEFAULT_BRIGHTNESS;
                        if (default_brt < PM_MIN_BRIGHTNESS || default_brt > PM_MAX_BRIGHTNESS)
                                vconf_set_int(VCONFKEY_SETAPPL_LCD_BRIGHTNESS, brt);
@@ -448,7 +448,7 @@ static void set_alc_function(keynode_t *key_nodes, void *data)
        int status, ret;
 
        if (key_nodes == NULL) {
-               _E("wrong parameter, key_nodes is null");
+               _E("Wrong parameter, key_nodes is null.");
                return;
        }
 
@@ -459,21 +459,21 @@ static void set_alc_function(keynode_t *key_nodes, void *data)
        case SETTING_BRIGHTNESS_AUTOMATIC_ON:
        case SETTING_BRIGHTNESS_AUTOMATIC_PAUSE:
                ret = set_autobrightness_state(status);
-               _D("set auto brightness : %d", ret);
+               _D("Set auto brightness: %d", ret);
                break;
        default:
-               _E("invalid value! %d", status);
+               _E("Invalid value(%d)", status);
        }
 }
 
 static void set_alc_automatic_brt(keynode_t *key_nodes, void *data)
 {
        if (key_nodes == NULL) {
-               _E("wrong parameter, key_nodes is null");
+               _E("Wrong parameter, key_nodes is null.");
                return;
        }
        automatic_brt = vconf_keynode_get_int(key_nodes) / AUTOMATIC_DEVIDE_VAL;
-       _D("automatic brt : %d", automatic_brt);
+       _D("Automatic brt(%d)", automatic_brt);
 
        alc_update_brt(true);
 }
@@ -491,7 +491,7 @@ static gboolean update_handler(void *data)
        if (ret < 0 || on != SETTING_BRIGHTNESS_AUTOMATIC_ON)
                return G_SOURCE_REMOVE;
 
-       _D("auto brightness is working!");
+       _D("Auto brightness is working.");
        alc_update_brt(true);
 
        return G_SOURCE_REMOVE;
@@ -526,10 +526,10 @@ static int prepare_lsensor(void *data)
 
        vconf_get_int(VCONFKEY_SETAPPL_LCD_AUTOMATIC_BRIGHTNESS, &brt);
        if (brt < PM_MIN_BRIGHTNESS || brt > PM_MAX_BRIGHTNESS) {
-               _E("Failed to get automatic brightness!");
+               _E("Failed to get automatic brightness.");
        } else {
                automatic_brt = brt / AUTOMATIC_DEVIDE_VAL;
-               _I("automatic brt init success %d", automatic_brt);
+               _I("Automatic brt(%d) init success." , automatic_brt);
        }
 
        vconf_notify_key_changed(VCONFKEY_SETAPPL_LCD_AUTOMATIC_BRIGHTNESS,
@@ -565,7 +565,7 @@ static int set_autobrightness_min(int val, char *name)
 
        update_brightness_direct();
 
-       _I("auto brightness min value changed! (%d, %s)",
+       _I("Auto brightness min value changed. min_brightness=%d min_brightness_name=%s",
            min_brightness, min_brightness_name);
 
        return 0;
@@ -585,7 +585,7 @@ static void reset_autobrightness_min(GDBusConnection *conn,
        if (strcmp(sender, min_brightness_name))
                return;
 
-       _I("change to default %d -> %d, %s", min_brightness,
+       _I("Change to default min brightness. before=%d changed=%d brightness_name=%s", min_brightness,
            PM_MIN_BRIGHTNESS, min_brightness_name);
        min_brightness = PM_MIN_BRIGHTNESS;
        if (min_brightness_name) {
old mode 100644 (file)
new mode 100755 (executable)
index 7afecc2..72ce1a2
@@ -64,12 +64,12 @@ static void ambient_set_condition(keynode_t *key_nodes, void *data)
        int state;
 
        if (key_nodes == NULL) {
-               _E("wrong parameter, key_nodes is null");
+               _E("Wrong parameter, key_nodes is null.");
                return;
        }
 
        ambient_condition = vconf_keynode_get_bool(key_nodes);
-       _I("ambient mode condition is %d", ambient_condition);
+       _I("Ambient mode condition is %d.", ambient_condition);
 
        state = (ambient_condition == 0 ? 0 : 1);
        device_notify(DEVICE_NOTIFIER_DISPLAY_AMBIENT_CONDITION, (void *)&state);
@@ -89,7 +89,7 @@ int ambient_set_state(int on)
        if (!on)
                ambient_pid = 0;
 
-       _D("AMBIENT is %s", (on ? ON : OFF));
+       _D("AMBIENT is %s.", (on ? ON : OFF));
 
        ambient_state = on;
 
@@ -115,7 +115,7 @@ void ambient_check_invalid_state(pid_t pid)
        if (ambient_get_state() == false)
                return;
 
-       _E("Invalid state! Ambient state is change to off!");
+       _E("Invalid state. Ambient state is change to off.");
 
        /* If lcd_power is on and ambient state is true
         * when pm state is changed to sleep,
@@ -156,7 +156,7 @@ static void end_clock(pid_t pid)
                update_count = 1;
        ambient_pid = pid;
 
-       _I("enter real ambient state by %d",
+       _I("Enter real ambient state by process(%d).",
            ambient_pid);
 }
 
@@ -180,10 +180,10 @@ static void ambient_init(void *data)
        ret = vconf_get_bool(VCONFKEY_SETAPPL_AMBIENT_MODE_BOOL,
            &ambient_condition);
        if (ret < 0) {
-               _E("Failed to get ambient mode condition ! (%d)", ret);
+               _E("Failed to get ambient mode condition: %d", ret);
                ambient_condition = false;
        }
-       _I("ambient mode condition is %d", ambient_condition);
+       _I("Ambient mode condition is %d.", ambient_condition);
 
        vconf_notify_key_changed(VCONFKEY_SETAPPL_AMBIENT_MODE_BOOL,
            ambient_set_condition, NULL);
old mode 100644 (file)
new mode 100755 (executable)
index 0a36de1..70a555e
@@ -85,7 +85,7 @@ static bool update_working_position(void)
 
        ret = sensor_listener_read_data(accel_listener, &data);
        if (ret != SENSOR_ERROR_NONE) {
-               _E("Fail to get accelerometer data! %d", ret);
+               _E("Failed to get accelerometer data: %d", ret);
                return true;
        }
 
@@ -96,7 +96,7 @@ static bool update_working_position(void)
        realg = (float)sqrt((x * x) + (y * y) + (z * z));
        pitch = ROTATION_90 - abs((int) (asin(z / realg) * RADIAN_VALUE));
 
-       _D("accel data [%f, %f, %f] - %f", x, y, z, pitch);
+       _D("Accel data x=%f y=%f z=%f pitch=%f", x, y, z, pitch);
 
        if (pitch >= WORKING_ANGLE_MIN && pitch <= WORKING_ANGLE_MAX)
                return true;
@@ -110,7 +110,7 @@ static void alc_set_brightness(int setting, int value, float light)
 
        ret = backlight_ops.get_brightness(&tmp_value);
        if (ret < 0) {
-               _E("Fail to get display brightness!");
+               _E("Failed to get display brightness.");
                return;
        }
 
@@ -123,7 +123,7 @@ static void alc_set_brightness(int setting, int value, float light)
                        position = update_working_position();
                        if (!position && (old > light)) {
                                _D("It's not working position, "
-                                   "LCD isn't getting dark!");
+                                   "LCD isn't getting dark.");
                                return;
                        }
                }
@@ -148,8 +148,8 @@ static void alc_set_brightness(int setting, int value, float light)
                        backlight_ops.set_default_brt(tmp_value);
                        backlight_ops.update();
                }
-               _I("load light data:%f ,auto brt %d,min brightness %d,"
-                   "brightness %d", light, automatic_brt, min_brightness, value);
+               _I("Load light data(%f). auto brt=%d min brightness=%d "
+                   "brightness=%d", light, automatic_brt, min_brightness, value);
                old = light;
        }
 }
@@ -180,13 +180,13 @@ static bool alc_update_brt(bool setting)
 
        ret = sensor_listener_read_data(light_listener, &light_data);
        if (ret != SENSOR_ERROR_NONE) {
-               _E("Failed to read light sensor data(%d)", ret);
+               _E("Failed to read light sensor data: %d", ret);
                goto out;
        }
 
        index = light_data.value_count - 1;
        if (index < 0 || light_data.values[index] < 0) {
-               _E("Invalid light sensor data");
+               _E("Invalid light sensor data.");
                goto out;
        }
 
@@ -194,12 +194,12 @@ static bool alc_update_brt(bool setting)
        ret = backlight_ops.get_brightness_by_light_sensor(
                        lmax, lmin, light, &value);
        if (ret == -ENOTSUP) {
-               _E("Not supported to handle the light data");
+               _E("Not supported to handle the light data.");
                goto out;
        }
 
        if (ret < 0 || value < PM_MIN_BRIGHTNESS || value > PM_MAX_BRIGHTNESS) {
-               _E("fail to load light data : light(%f), value(%d), ret(%d)", light, value, ret);
+               _E("Failed to load light data. light=%f value=%d: %d", light, value, ret);
                goto out;
        }
 
@@ -224,7 +224,7 @@ out:
                }
                vconf_set_int(VCONFKEY_SETAPPL_BRIGHTNESS_AUTOMATIC_INT,
                    SETTING_BRIGHTNESS_AUTOMATIC_OFF);
-               _E("Fault counts is over %d, disable automatic brightness", MAX_FAULT);
+               _E("Fault counts is over %d, disable automatic brightness.", MAX_FAULT);
                return false;
        }
        return true;
@@ -273,11 +273,11 @@ static int connect_sensor(void)
        sensor_h *list = NULL;
        int cnt = 0;
 
-       _I("connect with sensor fw");
+       _I("Connect with sensor fw.");
        /* light sensor */
        ret = sensor_get_sensor_list(SENSOR_LIGHT, &list, &cnt);
        if (ret != SENSOR_ERROR_NONE) {
-               _E("Failed to get light sensor list(%d)", ret);
+               _E("Failed to get light sensor list: %d", ret);
                goto error;
        }
 
@@ -293,25 +293,25 @@ static int connect_sensor(void)
 
        ret = sensor_get_min_range(sensor, &lmin);
        if (ret != SENSOR_ERROR_NONE) {
-               _E("Failed to get light sensor min range (%d)", ret);
+               _E("Failed to get light sensor min range: %d", ret);
                goto error;
        }
        ret = sensor_get_max_range(sensor, &lmax);
        if (ret != SENSOR_ERROR_NONE) {
-               _E("Failed to get light sensor max range (%d)", ret);
+               _E("Failed to get light sensor max range: %d", ret);
                goto error;
        }
        _I("Light sensor min(%f), max(%f)", lmin, lmax);
 
        ret = sensor_create_listener(sensor, &light_listener);
        if (ret != SENSOR_ERROR_NONE) {
-               _E("Failed to create listener(light)!");
+               _E("Failed to create listener(light).");
                goto error;
        }
        sensor_listener_set_option(light_listener, SENSOR_OPTION_ALWAYS_ON);
        ret = sensor_listener_start(light_listener);
        if (ret != SENSOR_ERROR_NONE) {
-               _E("Failed to start light sensor!");
+               _E("Failed to start light sensor.");
                sensor_destroy_listener(light_listener);
                light_listener = 0;
                goto error;
@@ -323,18 +323,18 @@ static int connect_sensor(void)
        /* accelerometer sensor */
        ret = sensor_get_default_sensor(SENSOR_ACCELEROMETER, &sensor);
        if (ret != SENSOR_ERROR_NONE) {
-               _E("Failed to get default accel sensor!");
+               _E("Failed to get default accel sensor.");
                goto error;
        }
        ret = sensor_create_listener(&sensor, &accel_listener);
        if (ret != SENSOR_ERROR_NONE) {
-               _E("Failed to create listener(accel)!");
+               _E("Failed to create listener(accel).");
                goto error;
        }
        sensor_listener_set_option(accel_listener, SENSOR_OPTION_ALWAYS_ON);
        ret = sensor_listener_start(accel_listener);
        if (ret != SENSOR_ERROR_NONE) {
-               _E("Failed to start accel sensor!");
+               _E("Failed to start accel sensor.");
                sensor_destroy_listener(accel_listener);
                accel_listener = 0;
                goto error;
@@ -360,7 +360,7 @@ error:
 
 static int disconnect_sensor(void)
 {
-       _I("disconnect with sensor fw");
+       _I("Disconnect with sensor fw.");
        /* light sensor*/
        if (light_listener > 0) {
                sensor_listener_stop(light_listener);
@@ -391,8 +391,8 @@ void set_brightness_changed_state(void)
 {
        if (pm_status_flag & PWRSV_FLAG) {
                pm_status_flag |= BRTCH_FLAG;
-               _D("brightness changed in low battery,"
-                   "escape dim state (light)");
+               _D("Brightness changed in low battery,"
+                   "escape dim state (light).");
        }
 }
 
@@ -420,7 +420,7 @@ static int set_autobrightness_state(int status)
                    g_timeout_add_seconds(display_conf.lightsensor_interval,
                            alc_handler, NULL);
        } else if (status == SETTING_BRIGHTNESS_AUTOMATIC_PAUSE) {
-               _I("auto brightness paused!");
+               _I("Auto brightness paused.");
                disconnect_sensor();
        } else {
                disconnect_sensor();
@@ -429,7 +429,7 @@ static int set_autobrightness_state(int status)
 
                ret = get_setting_brightness(&default_brt);
                if (ret != 0 || (default_brt < PM_MIN_BRIGHTNESS || default_brt > PM_MAX_BRIGHTNESS)) {
-                       _I("fail to read vconf value for brightness");
+                       _I("Failed to read vconf value for brightness.");
                        brt = PM_DEFAULT_BRIGHTNESS;
                        if (default_brt < PM_MIN_BRIGHTNESS || default_brt > PM_MAX_BRIGHTNESS)
                                vconf_set_int(VCONFKEY_SETAPPL_LCD_BRIGHTNESS, brt);
@@ -448,7 +448,7 @@ static void set_alc_function(keynode_t *key_nodes, void *data)
        int status, ret;
 
        if (key_nodes == NULL) {
-               _E("wrong parameter, key_nodes is null");
+               _E("Wrong parameter, key_nodes is null.");
                return;
        }
 
@@ -459,21 +459,21 @@ static void set_alc_function(keynode_t *key_nodes, void *data)
        case SETTING_BRIGHTNESS_AUTOMATIC_ON:
        case SETTING_BRIGHTNESS_AUTOMATIC_PAUSE:
                ret = set_autobrightness_state(status);
-               _D("set auto brightness : %d", ret);
+               _D("Set auto brightness: %d", ret);
                break;
        default:
-               _E("invalid value! %d", status);
+               _E("Invalid value(%d)", status);
        }
 }
 
 static void set_alc_automatic_brt(keynode_t *key_nodes, void *data)
 {
        if (key_nodes == NULL) {
-               _E("wrong parameter, key_nodes is null");
+               _E("Wrong parameter, key_nodes is null.");
                return;
        }
        automatic_brt = vconf_keynode_get_int(key_nodes) / AUTOMATIC_DEVIDE_VAL;
-       _D("automatic brt : %d", automatic_brt);
+       _D("Automatic brt(%d)", automatic_brt);
 
        alc_update_brt(true);
 }
@@ -491,7 +491,7 @@ static gboolean update_handler(void *data)
        if (ret < 0 || on != SETTING_BRIGHTNESS_AUTOMATIC_ON)
                return G_SOURCE_REMOVE;
 
-       _D("auto brightness is working!");
+       _D("Auto brightness is working.");
        alc_update_brt(true);
 
        return G_SOURCE_REMOVE;
@@ -526,10 +526,10 @@ static int prepare_lsensor(void *data)
 
        vconf_get_int(VCONFKEY_SETAPPL_LCD_AUTOMATIC_BRIGHTNESS, &brt);
        if (brt < PM_MIN_BRIGHTNESS || brt > PM_MAX_BRIGHTNESS) {
-               _E("Failed to get automatic brightness!");
+               _E("Failed to get automatic brightness.");
        } else {
                automatic_brt = brt / AUTOMATIC_DEVIDE_VAL;
-               _I("automatic brt init success %d", automatic_brt);
+               _I("Automatic brt(%d) init success.", automatic_brt);
        }
 
        vconf_notify_key_changed(VCONFKEY_SETAPPL_LCD_AUTOMATIC_BRIGHTNESS,
@@ -565,7 +565,7 @@ static int set_autobrightness_min(int val, char *name)
 
        update_brightness_direct();
 
-       _I("auto brightness min value changed! (%d, %s)",
+       _I("Auto brightness min value changed. min_brightness=%d min_brightness_name=%s",
            min_brightness, min_brightness_name);
 
        return 0;
@@ -585,7 +585,7 @@ static void reset_autobrightness_min(GDBusConnection *conn,
        if (strcmp(sender, min_brightness_name))
                return;
 
-       _I("change to default %d -> %d, %s", min_brightness,
+       _I("Change to default min brightness. before=%d changed=%d brightness_name=%s", min_brightness,
            PM_MIN_BRIGHTNESS, min_brightness_name);
        min_brightness = PM_MIN_BRIGHTNESS;
        if (min_brightness_name) {
old mode 100644 (file)
new mode 100755 (executable)
index cd4a654..6b8656f
@@ -42,16 +42,16 @@ static void __cb(GVariant *var, void *user_data, GError *err)
         int ret;
 
        if (!var) {
-               _E("no message [%s]", err->message);
+               _E("No message: %s", err->message);
                return;
        }
 
        if (!dh_get_param_from_var(var, "(i)", &ret)) {
-               _E("no message [%s]", g_variant_get_type_string(var));
+               _E("No message: %s", g_variant_get_type_string(var));
                goto out;
        }
 
-       _D("reply value : %d", ret);
+       _D("Reply value: %d", ret);
 
 out:
        g_variant_unref(var);
@@ -77,7 +77,7 @@ int launch_system_app(char *type, int num, ...)
                break;
        }
        if (match < 0) {
-               _E("Failed to find app matched (%s)", app_type);
+               _E("Failed to find matched app type(%s).", app_type);
                return -EINVAL;
        }
 
old mode 100644 (file)
new mode 100755 (executable)
index c01ee52..f9b9920
@@ -131,14 +131,14 @@ static bool get_battery_method(const char *method, int *value)
                        DEVICED_INTERFACE_BATTERY,
                        method, NULL);
        if (!msg) {
-               _E("fail (%s): no reply", method);
+               _E("Failed to call dbus method(%s): No reply.", method);
                return ret;
        }
 
        if (!dh_get_param_from_var(msg, "(i)", &val)) {
-               _E("fail (%s): no message", method);
+               _E("Failed to call dbus method(%s): No message.", method);
        } else {
-               _I("success (%s): %d", method, val);
+               _I("Success. %s=%d", method, val);
                ret = TRUE;
                if (NULL != value)
                        *value = val;
@@ -159,17 +159,17 @@ static bool get_battery_method_vconf(const char *method)
                        DEVICED_INTERFACE_BATTERY,
                        method, NULL);
        if (!msg) {
-               _E("fail (%s): no reply", method);
+               _E("Failed to call dbus method(%s): No reply.", method);
                return ret;
        }
 
        if (!dh_get_param_from_var(msg, "(i)", &val))
-               _E("fail (%s): no message", method);
+               _E("Failed to call dbus method(%s): No message.", method);
        else {
                if (val == -EIO) {
-                       _E("fail (%s): return fail", method);
+                       _E("Failed to call dbus method(%s): Return fail.", method);
                } else {
-                       _I("success (%s): %d", method, val);
+                       _I("Success. %s=%d", method, val);
                        ret = TRUE;
                }
        }
@@ -206,38 +206,38 @@ static bool set_battery_low_level(int newlevel)
                        METHOD_BATTERY_SETLOWBATLEVEL, g_variant_new("(i)", newlevel));
 
        if (!msg) {
-               _E("fail : no reply");
+               _E("Failed to call dbus method(%s): No reply", METHOD_BATTERY_SETLOWBATLEVEL);
                return ret;
        }
 
        if (!dh_get_param_from_var(msg, "(i)", &val)) {
-               _E("fail : no message");
+               _E("Failed to call dbus method(%s): No message", METHOD_BATTERY_SETLOWBATLEVEL);
                goto out;
        } else {
                if (newlevel <= DEFAULT_LOWBATLEVEL) {
                        if (0 != val) {
-                               _I("success : can't set low level (%d) smaller than default (%d)", newlevel, DEFAULT_LOWBATLEVEL);
+                               _I("Success. Can't set low level(%d) smaller than default(%d).", newlevel, DEFAULT_LOWBATLEVEL);
                                ret = TRUE;
                        } else {
-                               _E("fail : can't set low level (%d) smaller than default (%d), but returned success", newlevel, DEFAULT_LOWBATLEVEL);
+                               _E("Failed. Can't set low level(%d) smaller than default(%d), but returned success.", newlevel, DEFAULT_LOWBATLEVEL);
                        }
                        goto out;
                } else {
                        if (0 != val) {
-                               _E("fail : return fail");
+                               _E("Failed to call dbus method(%s): Return fail.", METHOD_BATTERY_SETLOWBATLEVEL);
                                goto out;
                        }
                }
        }
 
        if (!get_battery_low_level(&getlevel))   {
-               _E("fail : can't get battery low level");
+               _E("Failed to get battery low level.");
        } else {
                if (getlevel == newlevel) {
-                       _I("success : %d", newlevel);
+                       _I("Success : battery low level=%d", newlevel);
                        ret = TRUE;
                } else {
-                       _E("fail : set low level %d, but current low level %d", newlevel, getlevel);
+                       _E("Failed to set low level(%d). Current low level is %d.", newlevel, getlevel);
                }
        }
 out:
@@ -292,7 +292,7 @@ static bool get_battery_info()
                        DEVICED_INTERFACE_BATTERY,
                        METHOD_BATTERY_GETINFO, NULL);
        if (!msg) {
-               _E("fail: no reply");
+               _E("Failed to call dbus method(%s): No reply", METHOD_BATTERY_GETINFO);
                return ret;
        }
 
@@ -308,12 +308,12 @@ static bool get_battery_info()
                                                        &val[6], //voltage_now
                                                        &val[7], //voltage_average
                                                        &val[8])) //temperature
-               _E("fail: no message");
+               _E("Failed to call dbus method(%s): No message", METHOD_BATTERY_GETINFO);
        else {
                if (val[0] < 0) {
-                       _E("fail: return fail");
+                       _E("Failed to call dbus method(%s): Return fail", METHOD_BATTERY_GETINFO);
                } else {
-                       _I("success: %s %s %s %d %d %d %d %d", argv[0], argv[1], argv[2], val[1], val[2], val[3], val[4], val[5]);
+                       _I("Success: %s %s %s %d %d %d %d %d", argv[0], argv[1], argv[2], val[1], val[2], val[3], val[4], val[5]);
                        ret = TRUE;
                }
                g_free(argv[0]);
@@ -352,18 +352,18 @@ static bool set_battery_power_supply(int index)
                                                DEVICED_INTERFACE_BATTERY,
                                                POWER_SUBSYSTEM, var);
        if (!msg) {
-               _E("fail: no reply");
+               _E("Failed to call dbus method(%s): No reply", POWER_SUBSYSTEM);
                return ret;
        }
 
        if (!dh_get_param_from_var(msg, "(i)", &val)) {
-               _E("fail: no message");
+               _E("Failed to call dbus method(%s): No message", POWER_SUBSYSTEM);
                val = -EBADMSG;
        } else {
                if (val < 0) {
-                       _E("fail: return fail");
+                       _E("Failed to call dbus method(%s): Return fail", POWER_SUBSYSTEM);
                } else {
-                       _I("success: %d", val);
+                       _I("Success. val=%d", val);
                        ret = TRUE;
                }
        }
@@ -427,16 +427,16 @@ static void battery_init(void *data)
        int success = 0;
        int fail = 0;
 
-       _I("start test");
+       _I("Start test.");
 
        battery_test_all(&success, &fail);
 
-       _I("Total: %d, Success: %d, Fail: %d", success+fail, success, fail);
+       _I("Total=%d Success=%d Fail=%d", success+fail, success, fail);
 }
 
 static void battery_exit(void *data)
 {
-       _I("end test");
+       _I("End test.");
 
 }
 
@@ -445,9 +445,9 @@ static int battery_unit(int argc, char **argv)
        if (argc < 4) {
                int success = 0;
                int fail = 0;
-               _I("start test");
+               _I("Start test.");
                battery_test_all(&success, &fail);
-               _I("Total: %d, Success: %d, Fail: %d", success+fail, success, fail);
+               _I("Total=%d Success=%d Fail=%d", success+fail, success, fail);
        } else if (0 == strcasecmp(argv[3], METHOD_BATTERY_TIMETOFULL)) {
                get_battery_time_to_full();
        } else if (0 == strcasecmp(argv[3], METHOD_BATTERY_TIMETOEMPTY)) {
@@ -476,7 +476,7 @@ static int battery_unit(int argc, char **argv)
                for (int index = 0; index < ARRAY_SIZE(power_supply_types); index++)
                        set_battery_power_supply(index);
        } else {
-               _E("Unknown test case!!!");
+               _E("Unknown test case.");
        }
 
        return 0;
old mode 100644 (file)
new mode 100755 (executable)
index 4e808b6..70d84a5
@@ -90,7 +90,7 @@ static int add_batt_node(enum state_b b_index, time_t clock, int capacity)
 
        node = (struct Batt_node *) malloc(sizeof(struct Batt_node));
        if (node == NULL) {
-               _E("Not enough memory, add battery node fail!");
+               _E("Failed to add battery node. Not enough memory.");
                return -1;
        }
 
@@ -269,7 +269,7 @@ static int battinfo_calculation(void)
                                >= BATTERY_FULL_THRESHOLD) {
                        if (battery.charge_full == CHARGING_FULL) {
                                del_all_batt_node(B_CHARGING);
-                               _I("battery fully charged!");
+                               _I("Battery fully charged.");
                                update_time(A_TIMETOFULL, 0);
                                return 0;
                        }
@@ -309,10 +309,10 @@ static gboolean battinfo_cb(void *data)
 
 static int start_battinfo_gathering(int timeout)
 {
-       _I("Start battery gathering!");
+       _I("Start battery gathering.");
 
        if (timeout <= 0) {
-               _E("invalid timeout value [%d]!", timeout);
+               _E("Invalid timeout value(%d).", timeout);
                return -1;
        }
 
@@ -329,7 +329,7 @@ static int start_battinfo_gathering(int timeout)
 
 static void end_battinfo_gathering(void)
 {
-       _I("End battery gathering!");
+       _I("End battery gathering.");
 
        if (timeout_id) {
                g_source_remove(timeout_id);
@@ -348,7 +348,7 @@ GVariant * dbus_get_timetofull(GDBusConnection *conn,
 
        val = time_to_full;
 
-       _D("get time %d", val);
+       _D("Get time=%d", val);
 
        return g_variant_new("(i)", val);
 }
@@ -361,7 +361,7 @@ static GVariant * dbus_get_timetoempty(GDBusConnection *conn,
 
        val = time_to_empty;
 
-       _D("get time %d", val);
+       _D("Get time=%d", val);
 
        return g_variant_new("(i)", val);
 }
@@ -399,7 +399,7 @@ static void battery_init(void *data)
 
        ret = dbus_handle_add_dbus_object(NULL, DEVICED_PATH_BATTERY, &dbus_interface);
        if (ret < 0)
-               _E("fail to init dbus method(%d)", ret);
+               _E("Failed to init dbus method: %d", ret);
 
        start_battinfo_gathering(POLLING_TIME);
 }
old mode 100644 (file)
new mode 100755 (executable)
index 413a968..080c23a
@@ -45,15 +45,15 @@ int booting_finished(void)
 
        reply = systemd_get_manager_property(SYSTEMD_DBUS_METHOD_SYSTEM_STATE);
        if (!reply) {
-               _E("Failed to get System State: no reply");
+               _E("Failed to get system state: No reply");
                goto err;
        }
        if (!dh_get_param_from_var(reply, "s", &state)) {
-               _E("Failed to get System State %s", g_variant_get_type_string(reply));
+               _E("Failed to get system state(%s)", g_variant_get_type_string(reply));
                goto err;
        }
 
-       _I("System State: (%s)", state);
+       _I("System state=%s", state);
 
        len = strlen(state) + 1;
        if (!strncmp(state, SYSTEMD_STATE_RUNNING, len) ||
@@ -95,17 +95,17 @@ static void booting_done_received(GDBusConnection  *conn,
 
                system_done = booting_finished();
                if (system_done == 0) {
-                       _E("System Session is not ready yet");
+                       _E("System session is not ready yet.");
                        return;
                }
-               _I("System Session is Ready");
+               _I("System session is ready.");
                device_notify_once(DEVICE_NOTIFIER_BOOTING_DONE, &system_done);
 
        } else if (strcmp(name, SYSTEMD_DBUS_SIGNAL_USER_STARTUP_FINISHED) == 0) {
                if (user_done)
                        return;
                user_done = 1;
-               _I("User Session is Ready");
+               _I("User session is ready.");
        }
 
        if (!system_done || !user_done)
@@ -113,11 +113,11 @@ static void booting_done_received(GDBusConnection  *conn,
 
        remove_booting_done_handler(NULL);
 
-       _I("real booting done, unlock LCD_OFF");
+       _I("Real booting done. Unlock LCD_OFF.");
        if (disp_plgn.pm_unlock_internal)
                disp_plgn.pm_unlock_internal(INTERNAL_LOCK_BOOTING, LCD_OFF, PM_SLEEP_MARGIN);
 
-       _I("signal booting done");
+       _I("Signal booting done.");
 
        dbus_handle_broadcast_dbus_signal(DEVICED_PATH_CORE,
                DEVICED_INTERFACE_CORE,
@@ -137,7 +137,7 @@ void add_booting_done_handler(void *data)
                                        NULL, NULL);
 
        if (sig_id[0] <= 0)
-               _E("fail to init dbus signal(%s)", SYSTEMD_DBUS_SIGNAL_SYSTEM_STARTUP_FINISHED);
+               _E("Failed to init dbus signal(%s).", SYSTEMD_DBUS_SIGNAL_SYSTEM_STARTUP_FINISHED);
 
        /* User Session is loaded completely */
        sig_id[1] = subscribe_dbus_signal(NULL,
@@ -148,5 +148,5 @@ void add_booting_done_handler(void *data)
                                        NULL, NULL);
 
        if (sig_id[1] <= 0)
-               _E("fail to init dbus signal(%s)", SYSTEMD_DBUS_SIGNAL_USER_STARTUP_FINISHED);
+               _E("Failed to init dbus signal(%s).", SYSTEMD_DBUS_SIGNAL_USER_STARTUP_FINISHED);
 }