From 0b75f8ddf81c1de0e488876713e433310c65147e Mon Sep 17 00:00:00 2001 From: Fabian Date: Tue, 2 Apr 2019 19:59:29 -0400 Subject: [PATCH] Making it ready for release --- package-lock.json | 8 ++++---- package.json | 4 ++-- readme.md | 4 ++-- src/index.ts | 8 ++++---- src/test.ts | 10 +++++----- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/package-lock.json b/package-lock.json index bc7dd24..9b098b0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,13 +1,13 @@ { "name": "@hibas123/nodelogging", - "version": "1.5.0-alpha.2", + "version": "1.6.0-alpha.2", "lockfileVersion": 1, "requires": true, "dependencies": { "@hibas123/logging": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@hibas123/logging/-/logging-1.0.1.tgz", - "integrity": "sha512-1yAq/Jjziot1tDbXZoi5TDuHkZxGB2hSlEuUkMnejvA60AfycNpTvzGd3ZLJC9fbKZFNxm2HfwW0pdIrecL0WQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@hibas123/logging/-/logging-1.1.0.tgz", + "integrity": "sha512-EaDyvvWDD+SikLgP6WTvTCR6Sk9Kp2BZkDbUk0Rz4pF2B4dGyO8yRI8qhBEtjbMXGqedeM5mQDGgvY5QUDevVg==", "requires": { "@hibas123/utils": "^2.0.2" } diff --git a/package.json b/package.json index aafbf83..f15ae14 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@hibas123/nodelogging", - "version": "1.6.0-alpha.2", + "version": "1.6.0", "description": "", "main": "out/index.js", "types": "out/index.d.ts", @@ -26,7 +26,7 @@ "typescript": "^3.3.4000" }, "dependencies": { - "@hibas123/logging": "^1.0.1", + "@hibas123/logging": "^1.1.0", "@hibas123/utils": "^2.0.2" } } \ No newline at end of file diff --git a/readme.md b/readme.md index c14795f..c86f813 100644 --- a/readme.md +++ b/readme.md @@ -31,10 +31,10 @@ All Logging types except the simple error take as many arguments as you want. Th NodeLogging can work without any configuration, but it may be useful to change the log output folder. -Todo so you are capable of creating own instances of the LoggingExtended class +Todo so you are capable of creating own instances of the LoggingBase class ``` javascript - const CustomLogging = new LoggingExtended(name | { + const CustomLogging = new LoggingBase(name | { name: "custom", // default undefined files: true | false | { //default true logfile: "./logs/test.log", diff --git a/src/index.ts b/src/index.ts index 23113cb..2825e91 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,5 @@ import { LoggingFiles } from "./filewriter"; -import { LoggingBase, LoggingBaseOptions } from "@hibas123/logging"; +import { LoggingBase as LoggingBaseOriginal, LoggingBaseOptions } from "@hibas123/logging"; export interface LoggingOptions extends LoggingBaseOptions { @@ -15,7 +15,7 @@ export interface LoggingOptions extends LoggingBaseOptions { } } -export class LoggingExtended extends LoggingBase { +export class LoggingBase extends LoggingBaseOriginal { constructor(config: Partial | string = {}) { super(config); @@ -42,9 +42,9 @@ export class LoggingExtended extends LoggingBase { } } -export let Logging: LoggingExtended = undefined; +export let Logging: LoggingBase = undefined; if (process.env.LOGGING_NO_DEFAULT !== "true") { - Logging = new LoggingExtended(); + Logging = new LoggingBase(); } export default Logging; diff --git a/src/test.ts b/src/test.ts index 0c96d60..2e34fd1 100644 --- a/src/test.ts +++ b/src/test.ts @@ -1,6 +1,6 @@ import { randomBytes } from "crypto"; import * as fs from "fs"; -import { Logging, LoggingExtended } from "."; +import { Logging, LoggingBase } from "."; const deleteFolderRecursive = function (path: string) { if (fs.existsSync(path)) { @@ -29,13 +29,13 @@ Logging.log("\x1b[31m\x1b[31m\x1b[31m\x1b[31m\x1b[31m\x1b[31m TEST \x1b[31m\x1b[ let err = new Error() if (typeof err.stack !== "string") console.log("Stacktrace invalid", err.stack) -let cus = new LoggingExtended({ name: "test" }); +let cus = new LoggingBase({ name: "test" }); cus.log("Hello from custom Logger") -let cus2 = new LoggingExtended("test2"); +let cus2 = new LoggingBase("test2"); cus2.log("Hello from custom Logger 2") -let cus22 = new LoggingExtended("test2"); +let cus22 = new LoggingBase("test2"); cus22.log("Hello from custom Logger 22") cus2.log("Hello from custom Logger 2") cus22.log("Hello from custom Logger 22") @@ -47,7 +47,7 @@ cus2.log("Hello from custom Logger 2") cus22.log("Hello from custom Logger 22") cus2.log("Hello from custom Logger 2") -const BenchmarkLogger = new LoggingExtended({ +const BenchmarkLogger = new LoggingBase({ console: false, name: "bench" })