Interface IScopeLog
Logging scope. Scope can be method or a specific part of it. The implementation is based on IDisposable where calling Dispose ends the scope. This the core interface where most of the "magic" happens.
Inherited Members
System.IDisposable.Dispose()
Namespace: DevInstance.LogScope
Assembly: DevInstance.LogScope.dll
Syntax
public interface IScopeLog : IDisposable
Properties
| Improve this Doc View SourceName
Name of the scope
Declaration
string Name { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
| Improve this Doc View SourceLine(LogLevel, String)
Write one line
Declaration
void Line(LogLevel level, string message)
Parameters
Type | Name | Description |
---|---|---|
LogLevel | level | Log level LogLevel |
System.String | message | Message |
Line(String)
Write one line with default log level;
Declaration
void Line(string message)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | Message |
Scope(LogLevel, String)
Creates a nested scope
Declaration
IScopeLog Scope(LogLevel level, string scope)
Parameters
Type | Name | Description |
---|---|---|
LogLevel | level | |
System.String | scope |
Returns
Type | Description |
---|---|
IScopeLog |
Scope(String)
Creates a nested scope with default log level;
Declaration
IScopeLog Scope(string scope)
Parameters
Type | Name | Description |
---|---|---|
System.String | scope |
Returns
Type | Description |
---|---|
IScopeLog |