Skip to content

Commit

Permalink
Merge pull request #1515 from hovancik/logs
Browse files Browse the repository at this point in the history
Add logs command line opt
  • Loading branch information
hovancik authored Nov 23, 2024
2 parents 8c56b80 + 683ad94 commit 8845e14
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 12 additions & 1 deletion app/utils/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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`)
Expand Down Expand Up @@ -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]'
Expand Down

0 comments on commit 8845e14

Please sign in to comment.