You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
When swag init is run by goreleaser in a CI/CD pipeline, swag outputs progress messages into the standard error stream, making goreleaser think that they are error messages:
What goreleaser does makes sense - after all how would it know it's not an error, if it's being output to stderr?
Describe the solution you'd like
It would be useful, if log messages did not go to standard error, unless they are about an error.
Describe alternatives you've considered
Can't think of any that would deliver satisfactory result. Disabling log output altogether means errors would be easy to miss and harder to debug.
Additional context
I had a look at swag codebase, and I can see that it is using Go standard library log module whose use is wrapped in a custom Println function. Perhaps, there could be two custom functions instead - one for logging errors and another for logging the progress? They would output to stderr and stdout, respectively. I'm open to other solutions as well.
The scope of proposed change seems to be minor, I can have a go at a PR, if you are happy with this? I'm open to a discussion and other approaches as well.
Cheers! 🙃
The text was updated successfully, but these errors were encountered:
Hi @olliefr,
I perfectly understand the issue and I agree it will be a nice improvement. The solution to having 2 different loggers sounds good to me. Looking forward for your implementation.
Is your feature request related to a problem? Please describe.
When
swag init
is run bygoreleaser
in a CI/CD pipeline,swag
outputs progress messages into the standard error stream, makinggoreleaser
think that they are error messages:What
goreleaser
does makes sense - after all how would it know it's not an error, if it's being output tostderr
?Describe the solution you'd like
It would be useful, if log messages did not go to standard error, unless they are about an error.
Describe alternatives you've considered
Can't think of any that would deliver satisfactory result. Disabling log output altogether means errors would be easy to miss and harder to debug.
Additional context
I had a look at
swag
codebase, and I can see that it is using Go standard librarylog
module whose use is wrapped in a customPrintln
function. Perhaps, there could be two custom functions instead - one for logging errors and another for logging the progress? They would output tostderr
andstdout
, respectively. I'm open to other solutions as well.The scope of proposed change seems to be minor, I can have a go at a PR, if you are happy with this? I'm open to a discussion and other approaches as well.
Cheers! 🙃
The text was updated successfully, but these errors were encountered: