Use private fields
This commit is contained in:
parent
1fd8da459b
commit
f34800d725
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hibas123/logging",
|
||||
"version": "2.4.4",
|
||||
"version": "2.4.5",
|
||||
"description": "",
|
||||
"main": "out/index.js",
|
||||
"types": "out/index.d.ts",
|
||||
|
@ -194,11 +194,11 @@ export class LoggingBase {
|
||||
}
|
||||
}
|
||||
|
||||
private $closed = false;
|
||||
#closed = false;
|
||||
|
||||
public close() {
|
||||
if (this.$closed) return;
|
||||
this.$closed = true;
|
||||
if (this.#closed) return;
|
||||
this.#closed = true;
|
||||
|
||||
this.adapterSet.adapters.forEach((adapter) => {
|
||||
let cached = adapterCache.get(adapter);
|
||||
@ -319,7 +319,7 @@ export class LoggingBase {
|
||||
message: any[],
|
||||
caller?: { file: string; line: number; column?: number }
|
||||
) {
|
||||
if (this.$closed) return;
|
||||
if (this.#closed) return;
|
||||
|
||||
let date = new Date().toISOString().replace(/T/, " ").replace(/\..+/, "");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user