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.4 to 5.1.5

4

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

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

"files": [
"src/*",
"!**/__specs__",
"!**/.*",
"src/*",
"main.js",

@@ -27,0 +27,0 @@ "main.d.ts",

@@ -265,2 +265,8 @@ import { ClientRequest, RequestOptions } from 'http';

/**
* Override appName used for resolving log path
* @param appName
*/
setAppName(appName: string): void;
/**
* Whether to write a log file synchronously. Default to true

@@ -267,0 +273,0 @@ */

@@ -24,3 +24,5 @@ 'use strict';

try {
appName = this.electron.app?.name || this.electron.app?.getName();
appName = this.appName
|| this.electron.app?.name
|| this.electron.app?.getName();
} catch {

@@ -27,0 +29,0 @@ // fallback to default value below

@@ -24,3 +24,13 @@ 'use strict';

getAppName() {
return this.appName || this.getAppPackageJson()?.name;
const appName = this.appName || this.getAppPackageJson()?.name;
if (!appName) {
throw new Error(
'electron-log can\'t determine the app name. It tried these methods:\n'
+ '1. Use `electron.app.name`\n'
+ '2. Use productName or name from the nearest package.json`\n'
+ 'You can also set it through log.transports.file.setAppName()',
);
}
return appName;
}

@@ -185,2 +195,6 @@

setAppName(appName) {
this.appName = appName;
}
setPlatform(platform) {

@@ -187,0 +201,0 @@ this.platform = platform;

@@ -57,2 +57,6 @@ 'use strict';

},
setAppName(name) {
logger.dependencies.externalApi.setAppName(name);
},
});

@@ -59,0 +63,0 @@

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