Skip to content
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.

All logging is written to STDERR #251

Closed
basvandenbrink opened this issue Sep 2, 2019 · 2 comments · Fixed by #252
Closed

All logging is written to STDERR #251

basvandenbrink opened this issue Sep 2, 2019 · 2 comments · Fixed by #252
Labels
bug Something isn't working

Comments

@basvandenbrink
Copy link

Describe the bug:
Fabrikate writes all output to STDERR.

To Reproduce:
Execute any fabrikate command.

Expected behavior:
Only errors are written to STDERR, all other messages should go to STDOUT.

Desktop:

  • OS: Linux
@basvandenbrink basvandenbrink added the bug Something isn't working label Sep 2, 2019
@evanlouie
Copy link
Contributor

evanlouie commented Sep 3, 2019

Hi @basvandenbrink, thanks for catching this.
This is caused from us using some of the default settings of logrus for logging which, by default, outputs all logs to stderr.

Sadly the library does not support switching between stdout and stderr for specific log levels within the library itself (only allows you to set a single output for all levels); and as you can see from the issue and PR below, the core maintainer has not been open to implementing or accepting any PRs to fix this.

sirupsen/logrus#403
sirupsen/logrus#671

I'll take some steps to resolve this on Fabrikates end this week:

  • Output all logs to stdout by default.
  • Create a wrapper logging service which will call logrus.SetOutput(os.<Stderr|Stdout>) as necessary.

@basvandenbrink
Copy link
Author

@evanlouie Thanks for the quick head-up! Good to hear it is picked up.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants