electron-log
Advanced tools
Comparing version 5.0.0-beta.22 to 5.0.0-beta.23
{ | ||
"name": "electron-log", | ||
"version": "5.0.0-beta.22", | ||
"version": "5.0.0-beta.23", | ||
"description": "Just a simple logging module for your Electron application", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
# electron-log | ||
[![Build Status](https://travis-ci.org/megahertz/electron-log.svg?branch=master)](https://travis-ci.org/megahertz/electron-log) | ||
[![Tests](https://github.com/megahertz/electron-log/actions/workflows/tests.yml/badge.svg)](https://github.com/megahertz/electron-log/actions/workflows/tests.yml) | ||
[![NPM version](https://badge.fury.io/js/electron-log.svg)](https://badge.fury.io/js/electron-log) | ||
@@ -4,0 +4,0 @@ [![Downloads](https://img.shields.io/npm/dw/electron-log)](https://img.shields.io/npm/dw/electron-log) |
@@ -41,3 +41,3 @@ 'use strict'; | ||
const __electronLog = { | ||
const electronLog = { | ||
sendToMain(message) { | ||
@@ -59,3 +59,3 @@ try { | ||
log(...data) { | ||
__electronLog.sendToMain({ data, level: 'info' }); | ||
electronLog.sendToMain({ data, level: 'info' }); | ||
}, | ||
@@ -65,3 +65,3 @@ }; | ||
for (const level of ['error', 'warn', 'info', 'verbose', 'debug', 'silly']) { | ||
__electronLog[level] = (...data) => __electronLog.sendToMain({ | ||
electronLog[level] = (...data) => electronLog.sendToMain({ | ||
data, | ||
@@ -74,3 +74,3 @@ level, | ||
try { | ||
contextBridge.exposeInMainWorld('__electronLog', __electronLog); | ||
contextBridge.exposeInMainWorld('__electronLog', electronLog); | ||
} catch { | ||
@@ -82,6 +82,7 @@ // Sometimes this files can be included twice | ||
if (typeof window === 'object') { | ||
window.__electronLog = __electronLog; | ||
} else if (typeof global === 'object') { | ||
global.__electronLog = __electronLog; | ||
window.__electronLog = electronLog; | ||
} else { | ||
// noinspection JSConstantReassignment | ||
__electronLog = electronLog; | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
112793
3483