Table of Contents

Class ConsoleLogger

Namespace
BenchmarkDotNet.Loggers
Assembly
BenchmarkDotNet.dll
public sealed class ConsoleLogger : ILogger
Inheritance
ConsoleLogger
Implements
Extension Methods

Constructors

ConsoleLogger(bool, Dictionary<LogKind, ConsoleColor>?)

public ConsoleLogger(bool unicodeSupport = false, Dictionary<LogKind, ConsoleColor>? colorScheme = null)

Parameters

unicodeSupport bool
colorScheme Dictionary<LogKind, ConsoleColor>

Fields

Ascii

public static readonly ILogger Ascii

Field Value

ILogger

Default

public static readonly ILogger Default

Field Value

ILogger

Unicode

public static readonly ILogger Unicode

Field Value

ILogger

Properties

Id

public string Id { get; }

Property Value

string

Priority

If there are several loggers with the same Id, only logger with the highest priority will be used.

public int Priority { get; }

Property Value

int

Methods

CreateGrayScheme()

public static Dictionary<LogKind, ConsoleColor> CreateGrayScheme()

Returns

Dictionary<LogKind, ConsoleColor>

Flush()

public void Flush()

Write(LogKind, string)

public void Write(LogKind logKind, string text)

Parameters

logKind LogKind
text string

WriteLine()

public void WriteLine()

WriteLine(LogKind, string)

public void WriteLine(LogKind logKind, string text)

Parameters

logKind LogKind
text string