UNPKG

503 BJavaScriptView Raw
1// src/browser.ts
2var LOG_METHODS = ["error", "warn", "info", "debug", "trace", "silent"];
3function getLogger(component) {
4 return LOG_METHODS.reduce((acc, cur) => {
5 const prop = cur;
6 if (console[prop]) {
7 acc[prop] = console[prop].bind(console, "".concat(component, ":"));
8 }
9 return acc;
10 }, {});
11}
12getLogger.setLevel = () => {
13};
14getLogger.setLogLevelsConfig = () => {
15};
16getLogger.waitForBuffer = () => {
17};
18getLogger.clearLogger = () => {
19};
20export {
21 getLogger as default
22};