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

eventregistry

Package Overview
Dependencies
Maintainers
0
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eventregistry - npm Package Compare versions

Comparing version 9.1.0 to 9.1.1

7

dist/logger.d.ts

@@ -21,5 +21,5 @@ export declare enum LogLevel {

private customLevels;
private readonly _errorLog;
private readonly _infoLog;
private readonly _requestLog;
private _errorLog;
private _infoLog;
private _requestLog;
constructor({ logging, logRequests }: LoggerConfig);

@@ -44,3 +44,4 @@ static createInstance({ logging, logRequests }: LoggerConfig): Logger;

logRequest(message: string): void;
private createFileTransports;
}
export {};

@@ -36,14 +36,2 @@ "use strict";

};
this._errorLog = new winston.transports.File({
filename: "logs/error.log",
level: "error",
});
this._infoLog = new winston.transports.File({
filename: "logs/info.log",
level: "info",
});
this._requestLog = new winston.transports.File({
filename: "logs/requests.log",
level: "request",
});
this._transports = [

@@ -53,2 +41,3 @@ new winston.transports.Console()

if (logging) {
this.createFileTransports();
this._transports.push(this._errorLog);

@@ -95,8 +84,11 @@ this._transports.push(this._infoLog);

Logger.prototype.enableRequestLogging = function () {
this.createFileTransports();
this._logger.add(this._requestLog);
};
Logger.prototype.disableRequestLogging = function () {
this.createFileTransports();
this._logger.remove(this._requestLog);
};
Logger.prototype.enableLogging = function () {
this.createFileTransports();
this._logger.add(this._errorLog);

@@ -106,2 +98,3 @@ this._logger.add(this._infoLog);

Logger.prototype.disableLogging = function () {
this.createFileTransports();
this._logger.remove(this._errorLog);

@@ -145,2 +138,21 @@ this._logger.remove(this._infoLog);

};
Logger.prototype.createFileTransports = function () {
if (this._errorLog && this._infoLog && this._requestLog)
return;
this._errorLog = new winston.transports.File({
filename: "logs/error.log",
level: "error",
lazy: true,
});
this._infoLog = new winston.transports.File({
filename: "logs/info.log",
level: "info",
lazy: true,
});
this._requestLog = new winston.transports.File({
filename: "logs/requests.log",
level: "request",
lazy: true,
});
};
return Logger;

@@ -147,0 +159,0 @@ }());

@@ -5,3 +5,3 @@ {

"description": "Package containing wrapper functions for Event Registry API",
"version": "9.1.0",
"version": "9.1.1",
"license": "MIT",

@@ -8,0 +8,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