Socket
Socket
Sign inDemoInstall

electron-log

Package Overview
Dependencies
Maintainers
1
Versions
152
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

electron-log - npm Package Compare versions

Comparing version 5.1.7 to 5.2.0

2

package.json
{
"name": "electron-log",
"version": "5.1.7",
"version": "5.2.0",
"description": "Just a simple logging module for your Electron application",

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

@@ -56,6 +56,7 @@ 'use strict';

this.addLevel('log', false);
for (const name of this.levels) {
this.addLevel(name, false);
}
this.log = this.info;
this.functions.log = this.log;

@@ -118,2 +119,3 @@ this.errorHandler = errorHandler;

const check = levels.indexOf(checkLevel);
if (check === -1 || pass === -1) {

@@ -120,0 +122,0 @@ return true;

@@ -9,4 +9,12 @@ import { ClientRequest, RequestOptions } from 'http';

type Format = (({ message: LogMessage }) => any[]) | string;
interface FormatParams {
data: any[];
level: LogLevel;
logger: Logger;
message: LogMessage;
transport: Transport;
}
type Format = string | ((params: FormatParams) => any[]);
type FOpenFlags = 'r' | 'r+' | 'rs+' | 'w' | 'wx' | 'w+' | 'wx+' |

@@ -505,2 +513,9 @@ 'a' | 'ax' | 'a+' | 'ax+';

interface EventFormatterInput {
args: unknown[];
event: object;
eventName: string;
eventSource: string;
}
interface EventLoggerOptions {

@@ -510,11 +525,3 @@ /**

*/
format?:
| string
| ((
args: {
eventName: string;
eventSource: EventSource;
handlerArgs: unknown[];
}
) => unknown[]);
format?: string | ((input: EventFormatterInput) => unknown[]);

@@ -526,17 +533,7 @@ /**

EventSource,
Record<
string,
(
args: {
args: unknown[];
event: object;
eventName: string;
eventSource: string;
}
) => unknown
>
Record<string, (input: EventFormatterInput) => object | unknown[]>
>;
/**
* Allow to switch specific events on/off easily
* Allow switching specific events on/off easily
*/

@@ -543,0 +540,0 @@ events?: Record<EventSource, Record<string, boolean>>;

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