1 | // src/browser.ts
|
2 | var LOG_METHODS = ["error", "warn", "info", "debug", "trace", "silent"];
|
3 | function 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 | }
|
12 | getLogger.setLevel = () => {
|
13 | };
|
14 | getLogger.setLogLevelsConfig = () => {
|
15 | };
|
16 | getLogger.waitForBuffer = () => {
|
17 | };
|
18 | getLogger.clearLogger = () => {
|
19 | };
|
20 | export {
|
21 | getLogger as default
|
22 | };
|