BREAKING CHANGE(core): now has simple defaultLogger

This commit is contained in:
Philipp Kunz 2018-07-10 22:34:33 +02:00
parent accf03f1b4
commit 4fd4de20c2
2 changed files with 3 additions and 10 deletions

View File

@ -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);
});

View File

@ -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;
};