Class MongoDbLog

A Logger that logs the DB activities between the server and the database.

See

https://www.mongodb.com/docs/drivers/node/current/fundamentals/monitoring/cluster-monitoring/ for information about the MongoDB events.

Hierarchy

  • MongoDbLog

Constructors

Properties

client: MongoClient
logger: Logger
mongoDbLogLabel: { dbType: string; logType: string } = ...

Type declaration

  • dbType: string
  • logType: string

Methods

  • Monitoring events related to the connection between the server and the database.

    Function

    clusterLogging

    Returns void

  • Monitoring events related to the command that is sent to the database.

    Function

    commandLogging

    Returns void

  • Executing the logging function

    Parameters

    • isClusterLogging: boolean = true

      Indicating whether the logger should log the Cluster-related events

    • isCommandLogging: boolean = true

      Indicating whether the logger should log the Command-related events

    Returns void