Options
All
  • Public
  • Public/Protected
  • All
Menu

Class LoggerOutputAreaModel

Output Area Model implementation which is able to limit number of outputs stored.

Hierarchy

Implements

Index

Constructors

constructor

Properties

Private _applyMaxLength

_applyMaxLength: any

Manually apply length limit.

Private _maxLength

_maxLength: any

Protected clearNext

clearNext: boolean

A flag that is set when we want to clear the output area after the next addition to it.

Readonly contentFactory

contentFactory: IContentFactory

The output content factory used by the model.

Protected list

An observable list containing the output models for this output area.

Accessors

changed

isDisposed

  • get isDisposed(): boolean

length

  • get length(): number
  • Get the length of the items in the model.

    Returns number

maxLength

  • get maxLength(): number
  • set maxLength(value: number): void
  • Maximum number of outputs to store in the model.

    Returns number

  • Maximum number of outputs to store in the model.

    Parameters

    • value: number

    Returns void

stateChanged

trusted

  • get trusted(): boolean
  • set trusted(value: boolean): void
  • Get whether the model is trusted.

    Returns boolean

  • Set whether the model is trusted.

    Notes

    Changing the value will cause all of the models to re-set.

    Parameters

    • value: boolean

    Returns void

Methods

add

  • add(output: ILogOutput): number
  • Add an output, which may be combined with previous output.

    Parameters

    • output: ILogOutput

    Returns number

    The total number of outputs.

    Notes

    The output bundle is copied. Contiguous stream outputs of the same name are combined. The oldest outputs are possibly removed to ensure the total number of outputs is at most .maxLength.

clear

  • clear(wait?: boolean): void
  • Clear all of the output.

    Parameters

    • Optional wait: boolean

      Delay clearing the output until the next message is added.

    Returns void

dispose

  • dispose(): void

fromJSON

  • fromJSON(values: IOutput[]): void

get

set

  • set(index: number, value: IOutput): void
  • Set the value at the specified index.

    Parameters

    • index: number
    • value: IOutput

    Returns void

Protected shouldCombine

  • shouldCombine(options: { lastModel: ILogOutputModel; value: ILogOutput }): boolean
  • Whether an output should combine with the previous output.

    We combine if the two outputs are in the same second, which is the resolution for our time display.

    Parameters

    Returns boolean

toJSON

  • toJSON(): IOutput[]

Generated using TypeDoc