From a1cd860688698f047acffd2ba52948efc12503bb Mon Sep 17 00:00:00 2001 From: Fabian Stamm Date: Sat, 11 Apr 2020 16:48:27 +0200 Subject: [PATCH] Changing naming scheme of getChild --- package.json | 2 +- src/base.ts | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 577ad18..9f7da7e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@hibas123/logging", - "version": "2.3.2", + "version": "2.3.4", "description": "", "main": "out/index.js", "types": "out/index.d.ts", diff --git a/src/base.ts b/src/base.ts index 42ab320..609e288 100644 --- a/src/base.ts +++ b/src/base.ts @@ -110,10 +110,13 @@ export class LoggingBase { /** * Creates a new logging instance, with all the adapters from this one. After that the new Instance operates independent - * @param name Name/Prefix of the new child + * @param name Name/Prefix of the new child. The actual name will resolve as "/" */ getChild(name: string) { - let lg = new LoggingBase({ console: false, name }); + let lg = new LoggingBase({ + console: false, + name: this.name ? this.name + "/" + name : name, + }); this.adapter.forEach((a) => lg.addAdapter(a)); return lg; }