diff options
author | Treeki <treeki@gmail.com> | 2011-02-10 05:03:53 +0100 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2011-02-10 05:03:53 +0100 |
commit | 58dead7b909861732011325f5d4844eae21a9bc2 (patch) | |
tree | 1ae61678c8df37c245eabdc443a275fccaa53516 /NW4RTools/Logger.cs | |
parent | 58f30cf003a6b7b3686f70fa0539aa45d126b457 (diff) | |
download | nw4rtools-58dead7b909861732011325f5d4844eae21a9bc2.tar.gz nw4rtools-58dead7b909861732011325f5d4844eae21a9bc2.zip |
more stuff. added shapes and texture/material pairs and refactored Logger a bit
Diffstat (limited to '')
-rw-r--r-- | NW4RTools/Logger.cs | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/NW4RTools/Logger.cs b/NW4RTools/Logger.cs index d5a76f3..a6fbb70 100644 --- a/NW4RTools/Logger.cs +++ b/NW4RTools/Logger.cs @@ -5,9 +5,9 @@ using System.Text; namespace NW4RTools { public class LogContext : IDisposable { // An awful, awful hack - private readonly Logger Owner; + private readonly ILogger Owner; - public LogContext(Logger owner) { + public LogContext(ILogger owner) { Owner = owner; } @@ -16,13 +16,21 @@ namespace NW4RTools { } } - public class Logger { + public interface ILogger { + void Send(string format, params object[] args); + LogContext Push(string format, params object[] args); + void Pop(); + void Block(); + void Unblock(); + } + + public class ConsoleLogger : ILogger { private List<string> PrefixElements; private List<string> Names; private int BlockCount; private string Prefix; - public Logger() { + public ConsoleLogger() { Names = new List<string>(); Names.Add("root"); |