[tomboy] Add timestamp to Logger messages
- From: Sanford Armstrong <sharm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tomboy] Add timestamp to Logger messages
- Date: Sat, 17 Apr 2010 21:19:52 +0000 (UTC)
commit 7d51dece4ebe4d5e6a625aaf676150b8ac045d2d
Author: Sandy Armstrong <sanfordarmstrong gmail com>
Date: Sat Apr 17 14:14:24 2010 -0700
Add timestamp to Logger messages
Tomboy/Logger.cs | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/Tomboy/Logger.cs b/Tomboy/Logger.cs
index 46314ca..c46ec48 100644
--- a/Tomboy/Logger.cs
+++ b/Tomboy/Logger.cs
@@ -40,7 +40,13 @@ namespace Tomboy
public void Log (Level lvl, string msg, params object[] args)
{
- msg = string.Format ("[{0}]: {1}", Enum.GetName (typeof (Level), lvl), msg);
+ Console.Write ("[{0} {1:00}:{2:00}:{3:00}.{4:000}]",
+ Enum.GetName (typeof (Level), lvl),
+ DateTime.Now.Hour,
+ DateTime.Now.Minute,
+ DateTime.Now.Second,
+ DateTime.Now.Millisecond);
+ msg = string.Format (" {0}", msg);
if (args.Length > 0)
Console.WriteLine (msg, args);
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]