-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add new formatter log output for github #59
base: main
Are you sure you want to change the base?
Conversation
c343cf2
to
f2418cf
Compare
9eaefbd
to
9ea579c
Compare
8891875
to
932d12b
Compare
@theseion Looks like test is failing (cmd/regex_compare_test.go:151) because the error was not triggered per |
Signed-off-by: Felipe Zipitria <[email protected]>
Signed-off-by: Felipe Zipitria <[email protected]>
Signed-off-by: Felipe Zipitria <[email protected]>
932d12b
to
58bbb52
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
} | ||
|
||
func (s *loggerTestSuite) TestConsoleOutput() { | ||
s.logger = s.logger.Output(zerolog.ConsoleWriter{Out: s.out, NoColor: true, TimeFormat: "03:04:05"}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of configuring the console output here explicitly for the test, wouldn't it be better to have an additional choice to generate JSON output? Just like you did now for GH.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you mean console output? JSON is the default. Do you want something like SetConsoleOutput
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Zerolog's default is JSON, but our global logger is configured to use the console writer. So for users, currently, there's only the option of either console or GH optimised output. I don't see the point in testing JSON output if we don't offer it to users.
Signed-off-by: Felipe Zipitria [email protected]
Modify logger to output in a format parseable by Github's runners.
Fixes #56.
Pending: