Skip to content
ConsoleMonster
Class

LogEntry

ConsoleMonster.Widgets

Namespace
ConsoleMonster.Widgets
Assembly
ConsoleMonster
Modifiers
sealed

One line in a LogRegion.

Inheritance

  • object
  • LogEntry

Usage

Explore 5 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Returned or exposed by 3

Accepted by parameters 2

Constructors

LogEntry 4 overloads
public LogEntry(TimeSpan time, string level, string text) #

Creates an entry.

Parameters

time System.TimeSpan required
Session time of the entry.
level string required
Level: out, err, info, warn, verbose, debug, host, pass, fail.
text string required
The text (single line).
public LogEntry(TimeSpan time, string level, string text, DateTimeOffset? timestamp) #

Creates a literal entry with session time and an optional source timestamp.

Parameters

time System.TimeSpan required
Session time of the entry.
level string required
The source timestamp, or null when unknown.
text string required
The canonical log level.
timestamp System.DateTimeOffset? required
The original literal text.
public LogEntry(TimeSpan time, string level, string text, DateTimeOffset? timestamp, string? tag) #

Creates a literal entry from a named source, shown in the tag column and matched by LogFilter.Tag.

Parameters

time System.TimeSpan required
Session time of the entry.
level string required
The canonical log level.
text string required
The original literal text.
timestamp System.DateTimeOffset? required
The source timestamp, or null when unknown.
tag string? required
The source (a job, component or item name), or null.
public LogEntry(TimeSpan time, string level, RichText text) #

Creates a multicolour entry.

Parameters

time System.TimeSpan required
Session time of the entry.
level string required
The level.
text ConsoleMonster.Text.RichText required
The rich line.

Properties

public DateTimeOffset? Timestamp { get; } #

The source timestamp, or null when none was supplied.

public string? Tag { get; } #

The source the entry came from (a job, component or item name), or null.

public TimeSpan Time { get; } #

Session time of the entry.

public string Level { get; } #

The level.

public string Text { get; } #

The logical line's plain text, without markup.

public RichText? RichText { get; private set; } #

The rich source, or null for literal LogEntry.Text. Select LogEntry.LineIndex after rendering the source.

public int LineIndex { get; private set; } #

Zero-based line in LogEntry.RichText represented by this entry; zero for single-line or literal entries.