Skip to content

Latest commit

 

History

History
145 lines (120 loc) · 3.39 KB

Atc.Console.Spectre.Logging.md

File metadata and controls

145 lines (120 loc) · 3.39 KB

Atc.Console.Spectre.Logging


ConsoleLogger

public class ConsoleLogger : ILogger

Methods

BeginScope

IDisposable BeginScope(TState state)

IsEnabled

bool IsEnabled(LogLevel logLevel)

Log

void Log(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)

ConsoleLoggerConfiguration

public class ConsoleLoggerConfiguration

Properties

AllowMarkup

AllowMarkup

Summary: Gets or sets a value indicating whether the Spectre-markup is allowed.

ConsoleConfiguration

ConsoleConfiguration

ConsoleSettings

ConsoleSettings

IncludeExceptionNameForException

IncludeExceptionNameForException

Summary: Gets or sets a value indicating whether the exception-name should be rendered.

IncludeInnerMessageForException

IncludeInnerMessageForException

Summary: Gets or sets a value indicating whether the inner-exception-message should be rendered.

MinimumLogLevel

MinimumLogLevel

Summary: Gets or sets the minimum log level. If set to Information, then Trace and Debug will not be included.

Remarks: The ordered list:
Trace, Debug, Information, Warning, Error, Critical.

RenderingMode

RenderingMode

Summary: Gets or sets the rendering mode.

Remarks: The options:
Default, LogLevel, CategoryName, LogLevelAndCategoryName.

TimestampFormat

TimestampFormat

Summary: Gets or sets a value indicating whether the Timestamp should be rendered with the custom format.

Remarks: UseTimestamp setting has to be set in order for this setting to take effect.
The format has to be in a valid DateTime.ToString([TimestampFormat]) format.
Read more: https://docs.microsoft.com/en-us/dotnet/api/system.datetime.tostring?view=net-6.0

UseShortNameForLogLevel

UseShortNameForLogLevel

Summary: Gets or sets a value indicating whether the LogLevel should be rendered.

UseTimestamp

UseTimestamp

Summary: Gets or sets a value indicating whether the Timestamp should be rendered.

UseTimestampUtc

UseTimestampUtc

Summary: Gets or sets a value indicating whether the Timestamp should be rendered as UTC.

Remarks: UseTimestamp setting has to be set in order for this setting to take effect.

Methods

ToString

string ToString()

ConsoleLoggerProvider

public class ConsoleLoggerProvider : ILoggerProvider, IDisposable

Methods

CreateLogger

ILogger CreateLogger(string categoryName)

Dispose

void Dispose()

ConsoleRenderingMode

public enum ConsoleRenderingMode
Value Name Description Summary
0 Default Default
1 LogLevel Log Level
2 CategoryName Category Name
3 LogLevelAndCategoryName Log Level And Category Name

Generated by MarkdownCodeDoc version 1.2