0

I'm making a watchface for Tizen. Whenever I use dlog_print to debug something, nothing appears in the log window. However, other log entries (not mine) do appear, in vast quantities.

This is my first Tizen app, and I have no idea what to try.

Starting with the initial template for a watchface, I've added the following code to the update_watch function:

update_watch(appdata_s *ad, watch_time_h watch_time, int ambient)
{
    char watch_text[TEXT_BUF_SIZE];
    int hour24, minute, second;

    if (watch_time == NULL)
        return;

    watch_time_get_hour24(watch_time, &hour24);
    watch_time_get_minute(watch_time, &minute);
    watch_time_get_second(watch_time, &second);
    if (!ambient) {
        snprintf(watch_text, TEXT_BUF_SIZE, "<align=center>Hello Watch<br/>%02d:%02d:%02d</align>",
            hour24, minute, second);
    } else {
        snprintf(watch_text, TEXT_BUF_SIZE, "<align=center>Hello Watch<br/>%02d:%02d</align>",
            hour24, minute);
    }

    // debugging dlog...
    int ret = dlog_print(DLOG_FATAL, "USR_TAG", "test dlog boooooooooooooooooooooooooooooooooooooooo!!!");

    switch (ret) {
        case DLOG_ERROR_NONE:
        snprintf(watch_text, TEXT_BUF_SIZE, "<align=center>NO ERROR<br/><font_size=50>%02d:%02d</font_size></align>",
                hour24, minute);
        break;
        case DLOG_ERROR_NOT_PERMITTED:
            snprintf(watch_text, TEXT_BUF_SIZE, "<align=center>NOT PERMITTED<br/><font_size=50>%02d:%02d</font_size></align>",
                    hour24, minute);
            break;
        case DLOG_ERROR_INVALID_PARAMETER:
            snprintf(watch_text, TEXT_BUF_SIZE, "<align=center>INVALID PARAMETER<br/><font_size=50>%02d:%02d</font_size></align>",
                    hour24, minute);
            break;
        default:
            snprintf(watch_text, TEXT_BUF_SIZE, "<align=center>ERROR: %d<br/>%s<br/><font_size=50>%02d:%02d</font_size></align>",
                    ret, get_error_message(ret), hour24, minute);
            break;
    }
    // end of debugging dlog

    elm_object_text_set(ad->label, watch_text);
}

I expect the entry "test dlog boooooooooooooooooooooooooooooooooooooooo!!!" to appear in the log window in Tizen studio once every second. However, it doesn't. The function's return value is 64 as I can see in the label. Positive return values indicate success (the number of bytes written), so why isn't it showing up?

I've also tried different levels of log other than DLOG_FATAL, with identical results.

NeatNit
  • 526
  • 1
  • 4
  • 14

1 Answers1

0

Check if your log viewer is showing emulator's log while you are testing the app in a target.

This happens a lot. You can further ensure it by executing $ dlogutil -t 10 at the sdb shells of both the emulator and the target. It happens a lot during development especially if you have multiple targets and emulators are attached.

If you are confused which machine you are using in the sdb shell, try $ cat /etc/tizen-release.

MZX
  • 66
  • 3