<PackageReference Include="NLog" Version="6.1.3" />

NLog.Targets.ConsoleTarget

Writes log messages to the console.
public bool AutoFlush { get; set; }

Gets or sets a value indicating whether to auto-flush after WriteLine

public bool DetectConsoleAvailable { get; set; }

Gets or sets a value indicating whether to auto-check if the console is available - Disables console writing if Environment.UserInteractive = false (Windows Service) - Disables console writing if Console Standard Input is not available (Non-Console-App)

public Encoding Encoding { get; set; }

The encoding for writing messages to the Console.

public bool Error { get; set; }

Obsolete and replaced by StdErr with NLog v5. Gets or sets a value indicating whether to send the log messages to the standard error instead of the standard output.

public bool ForceWriteLine { get; set; }

Gets or sets whether to force WriteLine (slower) instead of the faster internal buffering.

public Layout<bool> StdErr { get; set; }

Gets or sets a value indicating whether to send the log messages to the standard error instead of the standard output.

public bool WriteBuffer { get; set; }

Gets or sets whether to activate internal buffering to allow batch writing, instead of using WriteLine

public ConsoleTarget()

Initializes a new instance of the ConsoleTarget class.

public ConsoleTarget(string name)

Initializes a new instance of the ConsoleTarget class.