BREAKING CHANGE(core): switch to esm

This commit is contained in:
2022-06-26 10:35:35 +02:00
parent d5d6d7bf79
commit 964666902f
14 changed files with 4602 additions and 18462 deletions

8
ts/00_commitinfo_data.ts Normal file
View File

@ -0,0 +1,8 @@
/**
* autocreated commitinfo by @pushrocks/commitinfo
*/
export const commitinfo = {
name: '@pushrocks/smartlog',
version: '3.0.0',
description: 'minimalistic distributed and extensible logging tool'
}

View File

@ -1,6 +1,6 @@
import * as plugins from './smartlog.plugins';
import { ConsoleLog } from './smartlog.classes.consolelog';
import { LogGroup } from './smartlog.classes.loggroup';
import { Smartlog } from './smartlog.classes.smartlog';
import * as plugins from './smartlog.plugins.js';
import { ConsoleLog } from './smartlog.classes.consolelog.js';
import { LogGroup } from './smartlog.classes.loggroup.js';
import { Smartlog } from './smartlog.classes.smartlog.js';
export { ConsoleLog, LogGroup, Smartlog };

View File

@ -1,4 +1,4 @@
import * as plugins from './smartlog.plugins';
import * as plugins from './smartlog.plugins.js';
/**
* a console log optimized for smartlog

View File

@ -1,5 +1,5 @@
import * as plugins from './smartlog.plugins';
import { Smartlog } from './smartlog.classes.smartlog';
import * as plugins from './smartlog.plugins.js';
import { Smartlog } from './smartlog.classes.smartlog.js';
export class LogGroup {
public smartlogRef: Smartlog;

View File

@ -1,4 +1,4 @@
import * as plugins from './smartlog.plugins';
import * as plugins from './smartlog.plugins.js';
import { ILogDestination, ILogPackage } from '@pushrocks/smartlog-interfaces';

View File

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