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.9 to 1.0.10

10

dist/index.d.ts
import { ILoggerChannel } from "./interfaces/ILoggerChannel";
import { ILoggerPayload } from "./interfaces/ILoggerPayload";
export { Console } from "./Console";
export { LogLevel } from "./constants/LogLevel";
export { ILoggerChannel } from "./interfaces/ILoggerChannel";
export { ILoggerPayload } from "./interfaces/ILoggerPayload";
export { ILogMessage } from "./interfaces/ILogMessage";
export declare class Logger {

@@ -8,5 +12,5 @@ private readonly channels;

constructor();
addChannel(channel: ILoggerChannel): void;
removeChannel(name: string): ILoggerChannel[];
setLevel(level: string): void;
addChannel(channel: ILoggerChannel): Logger;
removeChannel(name: string): Logger;
setLevel(level: string): Logger;
error(message: string, code?: number, object?: ILoggerPayload): Promise<any>;

@@ -13,0 +17,0 @@ fatal(message: string, code?: number, object?: ILoggerPayload, callback?: Function): Promise<any>;

@@ -21,2 +21,4 @@ "use strict";

exports.Console = Console_1.Console;
var LogLevel_2 = require("./constants/LogLevel");
exports.LogLevel = LogLevel_2.LogLevel;
class Logger {

@@ -29,2 +31,3 @@ constructor() {

this.channels.push(channel);
return this;
}

@@ -34,3 +37,4 @@ removeChannel(name) {

if (this.channels[i].constructor.name === name) {
return this.channels.splice(parseInt(i), 1);
this.channels.splice(parseInt(i), 1);
return this;
}

@@ -45,2 +49,3 @@ }

this.level = level;
return this;
}

@@ -47,0 +52,0 @@ error(message, code = LogCode_1.default.GENERAL_ERROR, object = {}) {

{
"name": "ts-composite-logger",
"version": "1.0.9",
"version": "1.0.10",
"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",

Sorry, the diff of this file is not supported yet

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