(namespace: string, constructor: T, ...args: ConstructorParameters<T>)
| 22 | return (namespace in this.namespaces); |
| 23 | } |
| 24 | sendObject<T extends abstract new (...args: any) => Error>(namespace: string, constructor: T, ...args: ConstructorParameters<T>): void { |
| 25 | if (!this.isEnabled(namespace)) { |
| 26 | return; |
| 27 | } |
| 28 | const obj = new (constructor as any)(...args); |
| 29 | const finalNamespace = this.prefix ? `${this.prefix}/${namespace}` : namespace; |
| 30 | this.logs.push({ ns: finalNamespace, obj }); |
| 31 | } |
| 32 | } |
no test coverage detected