BREAKING CHANGE(core): now has simple defaultLogger
This commit is contained in:
11
ts/index.ts
11
ts/index.ts
@ -1,13 +1,6 @@
|
||||
import * as plugins from './smartlog.plugins';
|
||||
import { Smartlog } from './smartlog.classes.smartlog';
|
||||
const defaultLogger: Smartlog = new Smartlog();
|
||||
|
||||
export { Smartlog };
|
||||
export { Smartlog, defaultLogger };
|
||||
|
||||
let defaultLogger: Smartlog;
|
||||
|
||||
export const getDefaultLogger = () => {
|
||||
if (!defaultLogger) {
|
||||
defaultLogger = new Smartlog();
|
||||
}
|
||||
return defaultLogger;
|
||||
};
|
||||
|
Reference in New Issue
Block a user