Compare commits

..

4 Commits

Author SHA1 Message Date
5d0056558a 2.0.7 2018-11-04 15:26:40 +01:00
2b920e2f5e fix(core): update 2018-11-04 15:26:40 +01:00
793cd38381 2.0.6 2018-11-04 14:19:31 +01:00
7a05e4484d fix(api): streamline api 2018-11-04 14:19:31 +01:00
3 changed files with 7 additions and 11 deletions

2
package-lock.json generated
View File

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

View File

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

View File

@ -1,7 +1,7 @@
import * as plugins from './smartlog.plugins'; import * as plugins from './smartlog.plugins';
// interfaces // interfaces
import { TLogType, TEnvironment, ILogContext, TLogLevel, TRuntime } from '@pushrocks/smartlog-interfaces'; import { TLogType, TEnvironment, ILogContext, TLogLevel, TRuntime, ILogDestination } from '@pushrocks/smartlog-interfaces';
import { LogRouter } from './smartlog.classes.logrouter'; import { LogRouter } from './smartlog.classes.logrouter';
@ -16,9 +16,11 @@ export class Smartlog {
private consoleEnabled: boolean; private consoleEnabled: boolean;
public logRouter = new LogRouter(); private logRouter = new LogRouter();
public addLogDestination = this.logRouter.addLogDestination; public addLogDestination (logDestinationArg: ILogDestination) {
this.logRouter.addLogDestination(logDestinationArg);
}
constructor(optionsArg: ISmartlogContructorOptions) { constructor(optionsArg: ISmartlogContructorOptions) {
this.logContext = optionsArg.logContext; this.logContext = optionsArg.logContext;
@ -37,12 +39,6 @@ export class Smartlog {
this.consoleEnabled = true; this.consoleEnabled = true;
} }
/**
* set a minimum serverity level to log
* @param levelArg
*/
level(levelArg: TLogLevel) {}
// ============= // =============
// log functions // log functions
// ============= // =============