Interface ILogger
The new ILogger differs from the legacy one in the message format the logging methods are accepting. In ILogger, each logging method accepts a message which specifies how the message would be formatted and one or many arguments that are used to replace placeholders in the message string. The following example shows a simplified version of how the ILogger is used in this driver:
logger.Info("Hello {0}, {1}", "Alice", "Bob");
public interface ILogger
- Extension Methods
Methods
- Debug(string, params object[])
Logs useful messages for debugging. The Bolt messages sent and received by this driver are logged at this level.
- Error(Exception, string, params object[])
Logs an error.
- Info(string, params object[])
Logs an information message.
- IsDebugEnabled()
Return if debug logging level is enabled.
- IsTraceEnabled()
Return if trace logging level is enabled.
- Trace(string, params object[])
Log useful messages for tracing. The Bolt messages sent and received in hex binary are logged at this level.
- Warn(Exception, string, params object[])
Logs a warning.