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.0.0-beta.1 to 5.0.0-beta.2

2

package.json
{
"name": "electron-log",
"version": "5.0.0-beta.1",
"version": "5.0.0-beta.2",
"description": "Just a simple logging module for your Electron application",

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

@@ -6,2 +6,5 @@ # electron-log

New v5 beta is ready and I would be grateful
[for any feedbacks](https://github.com/megahertz/electron-log/discussions/333).
Simple logging module Electron/Node.js/NW.js application.

@@ -12,5 +15,5 @@ No dependencies. No complicated configuration.

- **on Linux:** `~/.config/{app name}/logs/{process type}.log`
- **on macOS:** `~/Library/Logs/{app name}/{process type}.log`
- **on Windows:** `%USERPROFILE%\AppData\Roaming\{app name}\logs\{process type}.log`
- **on Linux:** `~/.config/{app name}/logs/main.log`
- **on macOS:** `~/Library/Logs/{app name}/main.log`
- **on Windows:** `%USERPROFILE%\AppData\Roaming\{app name}\logs\main.log`

@@ -34,3 +37,3 @@ ## Installation

// Optional, initialize logger for any renderer processses
// Optional, initialize the logger for any renderer processses
log.initialize({ preload: true });

@@ -50,2 +53,9 @@

If a bundler is used, you can just import the module:
```typescript
import log from 'electron-log/renderer';
log.info('Log from the renderer process');
```
There are a few other options how a logger can be initialized for a renderer

@@ -52,0 +62,0 @@ process. [Read more](docs/initialize.md).

@@ -412,7 +412,7 @@ import { RequestOptions } from 'http';

*/
onError?(
onError?(options: {
error: Error,
versions?: { app: string; electron: string; os: string },
submitIssue?: (url: string, data: ReportData | any) => void,
): void;
versions: { app: string; electron: string; os: string },
createIssue: (url: string, data: ReportData | any) => void,
}): void;
}

@@ -419,0 +419,0 @@

@@ -10,3 +10,3 @@ 'use strict';

bytesWritten = 0;
hasActiveAsyncWritting = false;
hasActiveAsyncWriting = false;
path = null;

@@ -89,11 +89,12 @@ initialSize = undefined;

if (this.hasActiveAsyncWritting || this.asyncWriteQueue.length < 1) {
if (this.hasActiveAsyncWriting || this.asyncWriteQueue.length === 0) {
return;
}
const text = this.asyncWriteQueue.shift();
this.hasActiveAsyncWritting = true;
const text = this.asyncWriteQueue.join('');
this.asyncWriteQueue = [];
this.hasActiveAsyncWriting = true;
fs.writeFile(this.path, text, this.writeOptions, function (e) {
file.hasActiveAsyncWritting = false;
fs.writeFile(this.path, text, this.writeOptions, (e) => {
file.hasActiveAsyncWriting = false;

@@ -100,0 +101,0 @@ if (e) {

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