UNPKG

@obelisk/client

Version:

Typescript client to interact with Obelisk on a higher level than the regular ReST API calls.

31 lines (30 loc) 872 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Logger = void 0; const config_1 = require("./config"); /** * @hidden */ class Logger { /** * Print in console.debug() if #Config.debug is true. console.debug is in the verbose section of the chrome console. * @param msg * @param prefix * @param delim */ static debug(msg, prefix, delim = ' ::: ') { if (config_1.Config.debug) { prefix ? console.debug(prefix + delim + msg) : console.debug(msg); } } /** * Print in console.log() (no matter the #Config.debug flag) * @param msg * @param prefix * @param delim */ static log(msg, prefix, delim = ' ::: ') { prefix ? console.log(prefix + delim + msg) : console.log(msg); } } exports.Logger = Logger;