Making it ready for release

This commit is contained in:
Fabian
2019-04-02 19:59:29 -04:00
parent 03cc58d3e1
commit 0b75f8ddf8
5 changed files with 17 additions and 17 deletions

View File

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

View File

@ -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"
})