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.
Actions