BREAKING CHANGE(core): now has simple defaultLogger
This commit is contained in:
parent
accf03f1b4
commit
4fd4de20c2
@ -4,7 +4,7 @@ import * as smartlog from '../ts/index';
|
||||
let defaultLogger: smartlog.Smartlog;
|
||||
|
||||
tap.test('should produce instance of Smartlog', async () => {
|
||||
defaultLogger = smartlog.getDefaultLogger();
|
||||
defaultLogger = smartlog.defaultLogger;
|
||||
expect(defaultLogger).to.be.instanceOf(smartlog.Smartlog);
|
||||
});
|
||||
|
||||
|
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;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user