BREAKING CHANGE(core): switch to esm
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
import * as plugins from './smartlog.plugins';
|
||||
import * as plugins from './smartlog.plugins.js';
|
||||
|
||||
import { LogRouter } from './smartlog.classes.logrouter';
|
||||
import { LogGroup } from '.';
|
||||
import { LogRouter } from './smartlog.classes.logrouter.js';
|
||||
import { LogGroup } from './smartlog.classes.loggroup.js';
|
||||
|
||||
export interface ISmartlogContructorOptions {
|
||||
logContext: plugins.smartlogInterfaces.ILogContext;
|
||||
@ -24,7 +24,7 @@ export class Smartlog implements plugins.smartlogInterfaces.ILogDestination {
|
||||
|
||||
constructor(optionsArg: ISmartlogContructorOptions) {
|
||||
this.logContext = optionsArg.logContext;
|
||||
this.minimumLogLevel = optionsArg.minimumLogLevel;
|
||||
this.minimumLogLevel = optionsArg.minimumLogLevel || 'silly';
|
||||
}
|
||||
|
||||
// ============
|
||||
@ -50,7 +50,7 @@ export class Smartlog implements plugins.smartlogInterfaces.ILogDestination {
|
||||
default:
|
||||
this.log('info', logString);
|
||||
}
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
// fileStream.write(args[0]);
|
||||
write.apply(process.stdout, args);
|
||||
@ -60,7 +60,7 @@ export class Smartlog implements plugins.smartlogInterfaces.ILogDestination {
|
||||
process.stderr.write = (...args: any) => {
|
||||
if (!args[0].startsWith('LOG')) {
|
||||
this.log('error', args[0]);
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
// fileStream.write(args[0]);
|
||||
write.apply(process.stderr, args);
|
||||
|
Reference in New Issue
Block a user