[gnome-builder] libide: add some tracing
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] libide: add some tracing
- Date: Mon, 23 Mar 2015 23:50:24 +0000 (UTC)
commit 12b38902f1590b6ed3e4948d92d1470143331b59
Author: Christian Hergert <christian hergert me>
Date: Tue Mar 3 00:05:46 2015 -0800
libide: add some tracing
libide/ide-unsaved-file.c | 19 +++++++++++++++----
1 files changed, 15 insertions(+), 4 deletions(-)
---
diff --git a/libide/ide-unsaved-file.c b/libide/ide-unsaved-file.c
index 260909f..5025233 100644
--- a/libide/ide-unsaved-file.c
+++ b/libide/ide-unsaved-file.c
@@ -16,6 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#define G_LOG_DOMAIN "ide-unsaved-file"
+
+#include "ide-debug.h"
#include "ide-unsaved-file.h"
G_DEFINE_BOXED_TYPE (IdeUnsavedFile, ide_unsaved_file,
@@ -64,17 +67,25 @@ ide_unsaved_file_persist (IdeUnsavedFile *self,
GCancellable *cancellable,
GError **error)
{
+ gboolean ret;
+
+ IDE_ENTRY;
+
g_return_val_if_fail (self, FALSE);
g_return_val_if_fail (!cancellable || G_IS_CANCELLABLE (cancellable), FALSE);
+ IDE_TRACE_MSG ("Saving draft to \"%s\"", self->temp_path);
+
/*
* TODO: Support cancellable.
*/
- return g_file_set_contents (self->temp_path,
- g_bytes_get_data (self->content, NULL),
- g_bytes_get_size (self->content),
- error);
+ ret = g_file_set_contents (self->temp_path,
+ g_bytes_get_data (self->content, NULL),
+ g_bytes_get_size (self->content),
+ error);
+
+ IDE_RETURN (ret);
}
gint64
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]