fix(core): update

This commit is contained in:
2023-07-12 19:21:36 +02:00
parent c4d6402fd9
commit 0caf48a734
7 changed files with 262 additions and 24 deletions

View File

@ -2,7 +2,7 @@
* autocreated commitinfo by @pushrocks/commitinfo
*/
export const commitinfo = {
name: '@pushrocks/smartlog',
version: '3.0.2',
name: '@push.rocks/smartlog',
version: '3.0.3',
description: 'minimalistic distributed and extensible logging tool'
}

View File

@ -1,21 +1,19 @@
import * as plugins from './smartlog.plugins.js';
import { ILogDestination, ILogPackage } from '@pushrocks/smartlog-interfaces';
export class LogRouter {
/**
* all log destinations
*/
private logDestinations: ILogDestination[] = [];
private logDestinations: plugins.smartlogInterfaces.ILogDestination[] = [];
constructor() {}
public addLogDestination(logDestination: ILogDestination) {
public addLogDestination(logDestination: plugins.smartlogInterfaces.ILogDestination) {
this.logDestinations.push(logDestination);
}
// routes the log according to added logDestinations
public async routeLog(logPackageArg: ILogPackage) {
public async routeLog(logPackageArg: plugins.smartlogInterfaces.ILogPackage) {
for (const logDestination of this.logDestinations) {
await logDestination.handleLog(logPackageArg);
}

View File

@ -1,4 +1,4 @@
import * as isounique from '@pushrocks/isounique';
import * as smartlogInterfaces from '@pushrocks/smartlog-interfaces';
import * as isounique from '@push.rocks/isounique';
import * as smartlogInterfaces from '@push.rocks/smartlog-interfaces';
export { isounique, smartlogInterfaces };