Keeps track of the default message sink (Default); contains a series of helper methods; and contains extension methods modeled after log4net: Fatal, Error, Warn, Info, Debug.
More...
Keeps track of the default message sink (Default); contains a series of helper methods; and contains extension methods modeled after log4net: Fatal, Error, Warn, Info, Debug.
Helpful article: http://core.loyc.net/essentials/messagesink.html
- See also
- IMessageSink
|
static SavedValue< IMessageSink > | SetDefault (IMessageSink sink) |
| Used to change the MessageSink.Default property temporarily. More...
|
|
static PushedCurrent | PushCurrent (IMessageSink sink) |
|
static object | LocationOf (object context) |
| Returns context.Location if context implements IHasLocation; otherwise, returns context itself. More...
|
|
static string | LocationString (object context) |
|
static string | GetLocationString (object context) |
| Gets the location information from the specified object, or converts the object to a string. This is the default method returned from ContextToString. More...
|
|
static SavedValue< Func< object, string > > | SetContextToString (Func< object, string > contextToString) |
| Sets the strategy that message sinks should use to convert a context object to a string. More...
|
|
static bool | IsFatalEnabled< C > (this IMessageSink< C > sink) |
|
static void | Fatal< C > (this IMessageSink< C > sink, C context, string format) |
|
static void | Fatal< C > (this IMessageSink< C > sink, C context, string format, params object[] args) |
|
static void | Fatal< C > (this IMessageSink< C > sink, C context, string format, object arg0, object arg1=null) |
|
static void | Fatal (this IMessageSink< object > sink, string format) |
|
static void | FatalFormat (this IMessageSink< object > sink, string format, params object[] args) |
|
static void | FatalFormat (this IMessageSink< object > sink, string format, object arg0, object arg1=null) |
|
static bool | IsErrorEnabled< C > (this IMessageSink< C > sink) |
|
static void | Error< C > (this IMessageSink< C > sink, C context, string format) |
|
static void | Error< C > (this IMessageSink< C > sink, C context, string format, params object[] args) |
|
static void | Error< C > (this IMessageSink< C > sink, C context, string format, object arg0, object arg1=null) |
|
static void | Error (this IMessageSink< object > sink, string format) |
|
static void | ErrorFormat (this IMessageSink< object > sink, string format, params object[] args) |
|
static void | ErrorFormat (this IMessageSink< object > sink, string format, object arg0, object arg1=null) |
|
static bool | IsWarnEnabled< C > (this IMessageSink< C > sink) |
|
static void | Warning< C > (this IMessageSink< C > sink, C context, string format) |
|
static void | Warning< C > (this IMessageSink< C > sink, C context, string format, params object[] args) |
|
static void | Warning< C > (this IMessageSink< C > sink, C context, string format, object arg0, object arg1=null) |
|
static void | Warn (this IMessageSink< object > sink, string format) |
|
static void | WarnFormat (this IMessageSink< object > sink, string format, params object[] args) |
|
static void | WarnFormat (this IMessageSink< object > sink, string format, object arg0, object arg1=null) |
|
static bool | IsInfoEnabled< C > (this IMessageSink< C > sink) |
|
static void | Info< C > (this IMessageSink< C > sink, C context, string format) |
|
static void | Info< C > (this IMessageSink< C > sink, C context, string format, params object[] args) |
|
static void | Info< C > (this IMessageSink< C > sink, C context, string format, object arg0, object arg1=null) |
|
static void | Info (this IMessageSink< object > sink, string format) |
|
static void | InfoFormat (this IMessageSink< object > sink, string format, params object[] args) |
|
static void | InfoFormat (this IMessageSink< object > sink, string format, object arg0, object arg1=null) |
|
static bool | IsDebugEnabled< C > (this IMessageSink< C > sink) |
|
static void | Debug< C > (this IMessageSink< C > sink, C context, string format) |
|
static void | Debug< C > (this IMessageSink< C > sink, C context, string format, params object[] args) |
|
static void | Debug< C > (this IMessageSink< C > sink, C context, string format, object arg0, object arg1=null) |
|
static void | Debug (this IMessageSink< object > sink, string format) |
|
static void | DebugFormat (this IMessageSink< object > sink, string format, params object[] args) |
|
static void | DebugFormat (this IMessageSink< object > sink, string format, object arg0, object arg1=null) |
|
static string | FormatMessage (Severity type, object context, string format, params object[] args) |
| Converts a quadruplet (type, context, format, args) to a single string containing all that information. The format string and the Severity are localized with Localize.Localized(string, object[]). More...
|
|
static MessageSinkFromDelegate | FromDelegate (WriteMessageFn writer, Func< Severity, bool > isEnabled=null) |
| Sends all messages to a user-defined method. More...
|
|
static MessageSinkWithContext | WithContext (object context, string messagePrefix=null) |
| Creates a message sink that writes to MessageSink.Default with a default context to be used when Write is called with context: null , so that you can use extension methods like Error(string) that do not have any context parameter. More...
|
|
static MessageSinkWithContext< TContext > | WithContext< TContext > (IMessageSink< TContext > target, TContext context, string messagePrefix=null) |
| Creates a message sink with a default context to be used when Write is called with context: null , so that you can use extension methods like Error(string) that do not have any context parameter. More...
|
|
static void | Write (this IMessageSink< object > sink, LogMessage msg) |
|
static void | Write (this IMessageSink< object > sink, ILogMessage msg) |
|