certificates icon indicating copy to clipboard operation
certificates copied to clipboard

All logs are currently sent to stderr

Open gareththered opened this issue 5 years ago • 5 comments
trafficstars

Running the following:

step-ca --password-file ./secrets/password  ./config/ca.json >output.txt 2>error.txt

results in:

-rw-r-----    1 step     step          6640 Jan 10 08:15 error.log
-rw-r-----    1 step     step             0 Jan 10 07:59 output.log

Notice that all logging information, including successful issuance are logged to stderr, not stdout. Success should be logged to stdout.

gareththered avatar Jan 10 '20 08:01 gareththered

Hey @gareththered, thanks for pointing this out! I "think" we did this on purpose, but it may have been for an old/antiquated reason at this point. Gonna take a look first thing next week and get back to you.

dopey avatar Jan 11 '20 03:01 dopey

@maraino is this something that will be addressed by switching to the new logger backend that we've been discussing?

dopey avatar Nov 18 '20 16:11 dopey

@dopey yes, this will be fixed once we switch to https://github.com/smallstep/logging

maraino avatar Nov 18 '20 18:11 maraino

Hi, many automation tools require stderr to be empty in order to consider the command execution successful.

May I ask you if there's any news on this?

Slamdunk avatar Aug 10 '22 07:08 Slamdunk

As I said before this will be addressed by replacing the logger with https://github.com/smallstep/logging, but we haven't prioritized this, I will tag this issue so it appears in our next triage.

maraino avatar Aug 10 '22 19:08 maraino