After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 762665 - Error loading logs entries
Error loading logs entries
Status: RESOLVED FIXED
Product: gnome-logs
Classification: Other
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: gnome-logs maintainer(s)
gnome-logs maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2016-02-25 08:15 UTC by Jonathan Kang
Modified: 2016-02-25 09:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Logs cannot load log entries normally (73.01 KB, image/png)
2016-02-25 08:15 UTC, Jonathan Kang
  Details
debug-priority.patch (1.11 KB, patch)
2016-02-25 08:47 UTC, Jonathan Kang
none Details | Review
debug-priority.patch (1.22 KB, patch)
2016-02-25 09:47 UTC, Jonathan Kang
committed Details | Review

Description Jonathan Kang 2016-02-25 08:15:52 UTC
Created attachment 322334 [details]
Logs cannot load log entries normally

Due to my commits yesterday(Commit ce3b9a7bd27c599f2d7a918c734e34d9bd5e14bc and Commit 13cb18f36fd5c4cd9e570bc071f9079659bf6450). Logs cannot load log entries normally. See it in the attached picture.

I found that if a log entry doesn't have PRIORITY field, it'll stop the loading process right there.

My solution would be remove GError while using gl_journal_get_data to fetch PRIORITY field. Because lots of log entries don't PRIORITY field, there will be a lot of debugging information saying that unable to fetch PRIORITY field, which is not that useful.
Comment 1 Jonathan Kang 2016-02-25 08:47:39 UTC
Created attachment 322337 [details] [review]
debug-priority.patch

Use g_debug instead of g_warning as debug information for fetching
PRIORITY field. And do not return NULL as the return value of
_gl_journal_query_entry.
Comment 2 David King 2016-02-25 09:40:56 UTC
Review of attachment 322337 [details] [review]:

::: src/gl-journal.c
@@ +438,3 @@
     if (error != NULL)
     {
+        g_debug ("%s", error->message);

This needs a comment as to why the priority is different from other fields (in other words, that some entries do not have the priority set, which is expected).
Comment 3 Jonathan Kang 2016-02-25 09:47:05 UTC
Created attachment 322344 [details] [review]
debug-priority.patch

Comment added to the patch
Comment 4 David King 2016-02-25 09:54:57 UTC
Review of attachment 322344 [details] [review]:

Sure, looks fine.
Comment 5 Jonathan Kang 2016-02-25 09:58:04 UTC
Pused to master as commit 9600be1f3911f994d40f5e0de78791c842a42978