[epiphany/wip/ephy-sync] Fix logging format



commit d2355156043c05b428dce8c41554afc5cb92e4df
Author: Gabriel Ivascu <ivascu gabriel59 gmail com>
Date:   Fri Jun 24 18:18:48 2016 +0300

    Fix logging format

 src/ephy-sync-secret.c  |    2 --
 src/ephy-sync-service.c |   15 ++++++++-------
 2 files changed, 8 insertions(+), 9 deletions(-)
---
diff --git a/src/ephy-sync-secret.c b/src/ephy-sync-secret.c
index 28e871b..4b430dd 100644
--- a/src/ephy-sync-secret.c
+++ b/src/ephy-sync-secret.c
@@ -71,8 +71,6 @@ ephy_sync_secret_forget_all_tokens (void)
 {
   GHashTable *attributes;
 
-LOG ("%s:%d", __func__, __LINE__);
-
   attributes = secret_attributes_build (EPHY_SYNC_TOKEN_SCHEMA, NULL);
   secret_service_clear (NULL,
                         EPHY_SYNC_TOKEN_SCHEMA,
diff --git a/src/ephy-sync-service.c b/src/ephy-sync-service.c
index 4e339b2..6f100ef 100644
--- a/src/ephy-sync-service.c
+++ b/src/ephy-sync-service.c
@@ -73,7 +73,7 @@ ephy_sync_service_init (EphySyncService *self)
     ephy_sync_secret_load_tokens (self);
   }
 
-LOG ("%s:%d", __func__, __LINE__);
+LOG ("[%d] sync service inited", __LINE__);
 }
 
 static void
@@ -82,10 +82,10 @@ server_response_cb (SoupSession *session,
                     gpointer     user_data)
 {
   if (message->status_code == 200) {
-LOG ("response body: %s", message->response_body->data);
+LOG ("[%d] response body: %s", __LINE__, message->response_body->data);
     // TODO: parse response data using JsonParser
   } else {
-LOG ("Error response from server: [%u] %s", message->status_code, message->reason_phrase);
+LOG ("[%d] Error response from server: [%u] %s", __LINE__, message->status_code, message->reason_phrase);
   }
 }
 
@@ -169,7 +169,8 @@ ephy_sync_service_login (EphySyncService *self)
   gchar *request_body;
   gchar *authPW;
 
-LOG ("%s:%d Preparing soup message", __func__, __LINE__);
+
+LOG ("[%d] Preparing soup message", __LINE__);
 
   session = soup_session_new_with_options (SOUP_SESSION_USER_AGENT,
                                            "test-json",
@@ -194,7 +195,7 @@ LOG ("%s:%d Preparing soup message", __func__, __LINE__);
                             strlen (request_body));
 
   soup_session_queue_message (session, message, server_response_cb, NULL);
-LOG ("%s:%d Queued the soup message", __func__, __LINE__);
+LOG ("[%d] Queued the soup message", __LINE__);
 
   // TODO: find a way to safely free request_body
   // TODO: find a way to safely destroy session, message
@@ -214,8 +215,6 @@ ephy_sync_service_stretch (EphySyncService *self,
 
   g_return_if_fail (EPHY_IS_SYNC_SERVICE (self));
 
-LOG ("%s:%d", __func__, __LINE__);
-
   salt_stretch = ephy_sync_utils_kwe ("quickStretch", emailUTF8);
   quickStretchedPW = g_malloc (EPHY_SYNC_TOKEN_LENGTH);
   ephy_sync_crypto_pbkdf2_1k ((guint8 *) passwordUTF8,
@@ -247,6 +246,8 @@ ephy_sync_utils_display_hex ("quickStretchedPW", quickStretchedPW, EPHY_SYNC_TOK
                          unwrapBKey,
                          EPHY_SYNC_TOKEN_LENGTH);
 
+LOG ("[%d] Stretching done", __LINE__);
+
   g_free (salt_stretch);
   g_free (info_unwrap);
   g_free (info_auth);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]