Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ts-composite-logger

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ts-composite-logger - npm Package Compare versions

Comparing version 1.0.8 to 1.0.9

11

index.ts

@@ -24,10 +24,12 @@ import LogCode from "./constants/LogCode";

public addChannel(channel: ILoggerChannel): void {
public addChannel(channel: ILoggerChannel): Logger {
this.channels.push(channel);
return this;
}
public removeChannel(name: string): ILoggerChannel[] {
public removeChannel(name: string): Logger {
for (const i in this.channels) {
if (this.channels[i].constructor.name === name) {
return this.channels.splice(parseInt(i), 1);
this.channels.splice(parseInt(i), 1);
return this;
}

@@ -39,3 +41,3 @@ }

public setLevel(level: string): void {
public setLevel(level: string): Logger {
if (!Object.values(LogLevel).includes(level)) {

@@ -46,2 +48,3 @@ throw new Error(`Unexpected log level: ${level}`);

this.level = level;
return this;
}

@@ -48,0 +51,0 @@

{
"name": "ts-composite-logger",
"version": "1.0.8",
"version": "1.0.9",
"description": "Logger written in typescript. Includes a console channel by default. Allows to add other log channels by extending ILogChannel interface.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc