electron-log
Advanced tools
Comparing version 5.0.0-beta.29 to 5.0.0-rc.1
{ | ||
"name": "electron-log", | ||
"version": "5.0.0-beta.29", | ||
"version": "5.0.0-rc.1", | ||
"description": "Just a simple logging module for your Electron application", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -77,3 +77,17 @@ 'use strict'; | ||
pathVariables = variables.getPathVariables(process.platform); | ||
// Make a shallow copy of pathVariables to keep getters intact | ||
pathVariables = Object.create( | ||
Object.prototype, | ||
{ | ||
...Object.getOwnPropertyDescriptors( | ||
variables.getPathVariables(process.platform), | ||
), | ||
fileName: { | ||
get() { | ||
return transport.fileName; | ||
}, | ||
enumerable: true, | ||
}, | ||
}, | ||
); | ||
@@ -104,5 +118,3 @@ if (typeof transport.archiveLog === 'function') { | ||
const vars = { ...pathVariables, fileName: transport.fileName }; | ||
const filePath = transport.resolvePathFn(vars, msg); | ||
const filePath = transport.resolvePathFn(pathVariables, msg); | ||
return registry.provide({ | ||
@@ -116,4 +128,3 @@ filePath, | ||
function readAllLogs({ fileFilter = (f) => f.endsWith('.log') } = {}) { | ||
const vars = { ...pathVariables, fileName: transport.fileName }; | ||
const logsPath = path.dirname(transport.resolvePathFn(vars)); | ||
const logsPath = path.dirname(transport.resolvePathFn(pathVariables)); | ||
@@ -120,0 +131,0 @@ return fs.readdirSync(logsPath) |
@@ -103,3 +103,5 @@ 'use strict'; | ||
appVersion, | ||
electronDefaultDir: electronApi.getPath('logs'), | ||
get electronDefaultDir() { | ||
return electronApi.getPath('logs'); | ||
}, | ||
home: getHome(), | ||
@@ -106,0 +108,0 @@ libraryDefaultDir: getLibraryDefaultDir(platform, appName), |
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
122856
3816