Options
All
  • Public
  • Public/Protected
  • All
Menu
description

This class defines the exact fields that are stored in the corresponding MongoDB documents. It should be used whenever database documents are being handled or read for the logs collection.

Note that this class uses the generic Transferable trait to enable a toDTO() method on the model.

todo

Timestamp fields should be numbers to avoid timezone issues.

since

v0.3.2

Hierarchy

Index

Constructors

Properties

collectionName: string = "logs"

This field contains the mongo collection name for entries that are stored using LogDocument or the model LogModel.

Note that this field is not part of document properties and used only internally to perform queries that refer to an individual collection name, e.g. $unionWith.

access

public

var

{string}

label: string

The label content of the log.

access

public

readonly
var

{string}

level: LogLevel

The level of the log.

access

public

readonly
see

LogLevel

var

{LogLevel}

message: string

The message content of the log.

access

public

readonly
var

{string}

meta: object

The meta object content of the log.

access

public

readonly
var

{object}

timestamp: Date

The timestamp in which the log occurred and was persisted.

access

public

readonly
var

{Date}

Accessors

  • get toQuery(): Record<string, unknown>
  • This method implements a specialized query format to query items individually, as documents, in the collection: system-logs.

    access

    public

    Returns Record<string, unknown>

    The individual document data that is used in a query.

Methods

Generated using TypeDoc