~ubuntu-branches/ubuntu/lucid/tomboy/lucid-proposed

« back to all changes in this revision

Viewing changes to Tomboy/Logger.cs

  • Committer: Ken VanDine
  • Date: 2010-10-26 14:37:51 UTC
  • mfrom: (47.1.1 lucid-proposed)
  • Revision ID: ken.vandine@canonical.com-20101026143751-m1bsy5ukg3h8f0rb
* New upstream version:
  - Fix bullet list indentation when printing (lp: #516494)
  - Add timestamp to logger messages, useful for watching autosync output, etc
  - Other fixes: LP:#556628

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
 
41
41
                public void Log (Level lvl, string msg, params object[] args)
42
42
                {
43
 
                        msg = string.Format ("[{0}]: {1}", Enum.GetName (typeof (Level), lvl), msg);
 
43
                        Console.Write ("[{0} {1:00}:{2:00}:{3:00}.{4:000}]",
 
44
                                       Enum.GetName (typeof (Level), lvl),
 
45
                                       DateTime.Now.Hour,
 
46
                                       DateTime.Now.Minute,
 
47
                                       DateTime.Now.Second,
 
48
                                       DateTime.Now.Millisecond);
 
49
                        msg = string.Format (" {0}", msg);
44
50
                        if (args.Length > 0)
45
51
                                Console.WriteLine (msg, args);
46
52
                        else