Compare commits

..

2 Commits

Author SHA1 Message Date
0ee2b8295a 2.0.0 2018-07-10 22:34:33 +02:00
4fd4de20c2 BREAKING CHANGE(core): now has simple defaultLogger 2018-07-10 22:34:33 +02:00
4 changed files with 5 additions and 12 deletions

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "@pushrocks/smartlog",
"version": "1.0.6",
"version": "2.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -1,6 +1,6 @@
{
"name": "@pushrocks/smartlog",
"version": "1.0.6",
"version": "2.0.0",
"private": false,
"description": "winston based logger for large scale projects",
"main": "dist/index.js",

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