Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Add a new ConsoleListener #67

Closed
jeremydmiller opened this Issue · 0 comments

1 participant

@jeremydmiller
// TODO -- this should be in FubuCore.  Nice to make a switch for it.
// Maybe use FubuMode?
public class ConsoleListener : ILogListener
{
    public bool ListensFor(Type type)
    {
        return true;
    }

    public void DebugMessage(object message)
    {
    }

    public void InfoMessage(object message)
    {
        Console.WriteLine(message);
    }

    public void Debug(string message)
    {
    }

    public void Info(string message)
    {
        Console.WriteLine(message);
    }

    public void Error(string message, Exception ex)
    {
        Console.WriteLine(message);
        Console.WriteLine(ex);
    }

    public void Error(object correlationId, string message, Exception ex)
    {
        Console.WriteLine(correlationId);
        Error(message, ex);
    }

    public bool IsDebugEnabled { get { return false; } }
    public bool IsInfoEnabled { get { return true; } }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.