Actions
Bug #17508
closedLog-file related error messages are printed to stdout
Status:
Closed
Priority:
Normal
Assignee:
Category:
Hammer core
Target version:
Difficulty:
trivial
Triaged:
Pull request:
Team Backlog:
Description
If hammer is unable to create a log file, it prints the following messages to stdout, followed by the normal output.
No permissions to create log dir <log_folder_path>
File <log_file_path> not writeable, won't log anything to the file!
This breaks scripts really badly when using --json because it makes the output non-compliant. Error messages like this (especially non-fatal ones) should be sent to stderr instead.
Looking at hammer_cli/logger.rb (lines 57 & 72), hammer is using puts instead of stderr.puts, so this should be an easy fix.
Updated by The Foreman Bot almost 8 years ago
- Status changed from New to Ready For Testing
- Assignee set to Tomáš Strachota
- Pull request https://github.com/theforeman/hammer-cli/pull/228 added
Updated by Tomáš Strachota almost 8 years ago
- Assignee deleted (
Tomáš Strachota) - Target version set to 1.10.1
Updated by Anonymous almost 8 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 3e18a4f8fbf9a2fa6c1660bd52c8a35084a3b174.
Updated by Tomáš Strachota over 7 years ago
- Translation missing: en.field_release set to 235
Actions