UNPKG

@wocker/core

Version:
33 lines (32 loc) 1.07 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Logger = void 0; const core_1 = require("../core"); const services_1 = require("../services"); class Logger { static getLogService() { var _a; const container = core_1.AsyncStorage.getStore(); if (!container) { return; } return (_a = container.getProvider(services_1.LogService)) === null || _a === void 0 ? void 0 : _a.instance; } static log(...data) { var _a; (_a = Logger.getLogService()) === null || _a === void 0 ? void 0 : _a.log(...data); } static info(...data) { var _a; (_a = Logger.getLogService()) === null || _a === void 0 ? void 0 : _a.info(...data); } static warn(...data) { var _a; (_a = Logger.getLogService()) === null || _a === void 0 ? void 0 : _a.warn(...data); } static error(...data) { var _a; (_a = Logger.getLogService()) === null || _a === void 0 ? void 0 : _a.error(...data); } } exports.Logger = Logger;