From 683ad9424089cac9885bf3480ccc2742a55f7824 Mon Sep 17 00:00:00 2001 From: Jan Hovancik Date: Sat, 23 Nov 2024 17:21:29 +0100 Subject: [PATCH] Add logs command line opt --- CHANGELOG.md | 1 + app/utils/commands.js | 13 ++++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a2a1bbfe6..50d9373b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Added - Bengali, Catalan, Greek and Serbian translations - it is not possible to close app during break that is in strict mode +- `logs` command line option to show location of logs ### Fixed - error when end break shortcut is not set diff --git a/app/utils/commands.js b/app/utils/commands.js index 3a2aadef0..f7dfae388 100644 --- a/app/utils/commands.js +++ b/app/utils/commands.js @@ -39,7 +39,10 @@ const allCommands = { description: 'Show this help message' }, version: { - description: 'Show current stretchly version' + description: 'Show current Stretchly version' + }, + logs: { + description: 'Show location of logs file' }, reset: { description: 'Reset breaks' @@ -179,6 +182,10 @@ class Command { this.ver() break + case 'logs': + this.logs() + break + default: if (this.hasSupportedCommand) { log.info(`Stretchly${this.isFirstInstance ? '' : ' 2'}: forwarding command '${this.command}' to the main instance`) @@ -227,6 +234,10 @@ class Command { console.log(`Stretchly version ${this.version}`) } + logs () { + console.log(log.transports.file.getFile().path) + } + cmdHelp () { let i = 0 const options = '[options]'