From 3f448d8bb1940e624f7c77faa995cb0928955a80 Mon Sep 17 00:00:00 2001 From: "Dominik.Sigmund" <dominik.sigmund@br.de> Date: Wed, 23 Aug 2023 11:59:19 +0200 Subject: [PATCH] Added config to type --- index.d.ts | 26 +++++++++++++++++++++++--- package.json | 2 +- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/index.d.ts b/index.d.ts index d3006cc..5007519 100755 --- a/index.d.ts +++ b/index.d.ts @@ -1,9 +1,7 @@ export as namespace Log; -export = Log; - /*~ Write your module's methods and properties in this class */ -declare class Log { +export class Log { constructor(config?: any); info(...message: any): string; notice(...message: any): string; @@ -12,3 +10,25 @@ declare class Log { log(...message: any): string; error(...message: any): string; } +export interface LogConfig { + name?: string; + hostname?: string; + file?: string; + path?: string; + loglevel?: LogLevel; + delimiter?: string; + format?: string; + loki?: LogConfigLoki; +} +export interface LogConfigLoki { + active?: boolean; + server?: string; +} +export enum LogLevel { + DEBUG = 5, + INFO = 4, + NOTICE = 3, + WARN = 2, + ERROR = 1, + FATAL = 0 +} diff --git a/package.json b/package.json index b842d56..0dc915a 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@libs/log", - "version": "3.1.3", + "version": "3.1.4", "description": "A simple Logger with Options!", "main": "index.js", "scripts": { -- GitLab