Skip to content

Commit

Permalink
fix(file): Variables not interpolated, fixes #429
Browse files Browse the repository at this point in the history
  • Loading branch information
megahertz committed Jul 16, 2024
1 parent d4e1381 commit f762eb4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion e2e/node/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

const log = require('../..');

log.debug('node debug');
log.debug('node %s', 'debug');
log.warn('node warn');
3 changes: 2 additions & 1 deletion e2e/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"name": "electron-log-test-node",
"version": "1.0.0",
"private": true,
"main": "main.js",
"scripts": {
"start": "node main.js"
"start": "node ."
}
}
7 changes: 5 additions & 2 deletions src/node/transports/file/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ const path = require('path');
const FileRegistry = require('./FileRegistry');
const { transform } = require('../../transforms/transform');
const { removeStyles } = require('../../transforms/style');
const { format } = require('../../transforms/format');
const {
format,
concatFirstStringElements,
} = require('../../transforms/format');
const { toString } = require('../../transforms/object');

module.exports = fileTransportFactory;
Expand Down Expand Up @@ -36,7 +39,7 @@ function fileTransportFactory(
maxSize: 1024 ** 2,
readAllLogs,
sync: true,
transforms: [removeStyles, format, toString],
transforms: [removeStyles, format, concatFirstStringElements, toString],
writeOptions: { flag: 'a', mode: 0o666, encoding: 'utf8' },

archiveLogFn(file) {
Expand Down

0 comments on commit f762eb4

Please sign in to comment.