Quellcodebibliothek Statistik Leitseite products/sources/formale Sprachen/GAP/pkg/francy/js/packages/francy-core/src/util/   (Algebra von RWTH Aachen Version 4.15.1©)  Datei vom 17.3.2023 mit Größe 1 kB image not shown  

Quelle  logger.js   Sprache: JAVA

 
import {GlobalConfiguration} from './configuration';

/**
 * This class provides a logger for the Francy application.
 */

class Log {

  /**
   * Logger constructor
   */

  constructor() {
  }

  /**
   * Creates a [DEBUG] entry in the console log
   * @param message the message to print
   * @param object and object to print along with the message
   */

  debug(message, object) {
    if (GlobalConfiguration.object.verbose) {
      if (object) {
        window.console.debug(Log._format('D', message), object);
      } else {
        window.console.debug(Log._format('D', message));
      }
    }
  }

  /**
   * Creates an [INFO] entry in the console log
   * @param message the message to print
   * @param object and object to print along with the message
   */

  info(message, object) {
    if (object) {
      window.console.info(Log._format('I', message), object);
    } else {
      window.console.info(Log._format('I', message));
    }
  }

  /**
   * Creates an [ERROR] entry in the console log
   * @param message the message to print
   * @param object and object to print along with the message
   */

  error(message, object) {
    if (object) {
      window.console.error(Log._format('E', message), object);
    } else {
      window.console.error(Log._format('E', message));
    }
  }

  /**
   * Creates a [WARN] entry in the console log
   * @param message the message to print
   * @param object and object to print along with the message
   */

  warn(message, object) {
    if (object) {
      window.console.info(Log._format('W', message), object);
    } else {
      window.console.info(Log._format('W', message));
    }
  }

  /**
   * This is a private method that formats all log messages
   * @param level the log level
   * @param message the message to print
   * @return {string} the formatted string
   * @private
   */

  static _format(level, message) {
    return `[${level} ${new Date().toISOString()}] - ${message}`;
  }
}

/**
 * The {Logger} singleton
 * @public
 */

export const Logger = new Log();

Messung V0.5
C=90 H=92 G=90

¤ Dauer der Verarbeitung: 0.10 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.