From 87a5b11d7598fc1e5239e11972c5e03a38bbb672 Mon Sep 17 00:00:00 2001 From: Alessandro Ghedini Date: Sun, 20 May 2012 20:01:21 +0200 Subject: Imported Upstream version 0.5.3 --- src/utilities/logger.vala | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/utilities/logger.vala') diff --git a/src/utilities/logger.vala b/src/utilities/logger.vala index 5334920..116cbcd 100644 --- a/src/utilities/logger.vala +++ b/src/utilities/logger.vala @@ -107,6 +107,15 @@ public class Logger { /// Appends a line to the statistics file ///////////////////////////////////////////////////////////////////// + public static int get_statistics_size() { + if (stats_length == -1) { + var stats = GLib.FileStream.open(Paths.stats, "a"); + stats_length = (int)stats.tell(); + } + + return stats_length; + } + public static void stats(string line) { var stats = GLib.FileStream.open(Paths.stats, "a"); -- cgit v1.2.3