Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "core/logging"

license

Copyright 2018 Google Inc. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Enumerations

Variables

Functions

Variables

Let verbosity

verbosity: Level = Level.INFO

The global verbosity level for Magenta.js.

Functions

log

  • log(msg: string, prefix?: string, level?: Level): void
  • Logs a message at the given verbosity level.

    If level is below the global verbosity level, the message is ignored.

    Parameters

    • msg: string

      The message to log.

    • Default value prefix: string = "Magenta.js"

      The prefix of the message, should specify the model or library that is doing the logging.

    • Default value level: Level = Level.INFO

      The verbosity level of the message. The message will not be logged if this level is greater than the verbosity setting.

    Returns void

logWithDuration

  • logWithDuration(msg: string, startTime: number, prefix?: string, level?: Level): void
  • Logs a message at the given verbosity level, with the duration.

    If level is below the global verbosity level, the message is ignored.

    Parameters

    • msg: string

      The message to log.

    • startTime: number

      The start time to use for duration calculation, in ms.

    • Default value prefix: string = "Magenta.js"

      The prefix of the message, should specify the model or library that is doing the logging.

    • Default value level: Level = Level.INFO

      The verbosity level of the message. The message will not be logged if this level is greater than the verbosity setting.

    Returns void

Generated using TypeDoc