Skip to content
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

Tweak logging. Add timezone, use everywhere. #402

Merged
merged 1 commit into from
Dec 19, 2018
Merged

Conversation

lkysow
Copy link
Member

@lkysow lkysow commented Dec 19, 2018

  • Use logger for all warnings. Previously we were writing warnings from
    cmd/server.go directly to stderr which bypassed our normal log format.
  • Add the timezone to log output. This is just really nice to have if
    you're looking at old logs.
  • Change levels to all be 4 characters: DBUG, INFO, WARN, EROR. This
    makes the logs easier to read because it lines up.
  • Log when we first receive the request as well as when we send a
    response. This makes it easier to see where the request starts and ends.

- Use logger for all warnings. Previously we were writing warnings from
cmd/server.go directly to stderr which bypassed our normal log format.
- Add the timezone to log output. This is just really nice to have if
you're looking at old logs.
- Change levels to all be 4 characters: DBUG, INFO, WARN, EROR. This
makes the logs easier to read because it lines up.
- Log when we first receive the request as well as when we send a
response. This makes it easier to see where the request starts and ends.
@codecov
Copy link

codecov bot commented Dec 19, 2018

Codecov Report

Merging #402 into master will increase coverage by 0.09%.
The diff coverage is 65.27%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #402      +/-   ##
==========================================
+ Coverage   69.84%   69.94%   +0.09%     
==========================================
  Files          62       63       +1     
  Lines        3817     3849      +32     
==========================================
+ Hits         2666     2692      +26     
- Misses        961      963       +2     
- Partials      190      194       +4
Impacted Files Coverage Δ
server/middleware.go 0% <0%> (ø) ⬆️
main.go 0% <0%> (ø) ⬆️
server/user_config.go 100% <100%> (ø)
cmd/server.go 78.23% <11.11%> (-0.94%) ⬇️
server/server.go 66.27% <50%> (ø) ⬆️
server/logging/simple_logger.go 88.75% <78.12%> (+4.46%) ⬆️
server/events/command_runner.go 70.71% <81.81%> (-0.61%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2b4f3f3...c4f8995. Read the comment docs.

@lkysow lkysow merged commit a6ca764 into master Dec 19, 2018
@lkysow lkysow deleted the logging-tweaks branch December 19, 2018 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant