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

Simplify --timestamps output #6146

Merged

Conversation

MarlonGamez
Copy link
Contributor

@MarlonGamez MarlonGamez commented Jul 7, 2021

Fixes #6148

Description
This PR changes the way we setup timestamp output when specifying with --timestamps=true. Previous implementation caused unnecessarily verbose output including irrelevant level field, due to setting up through logrus. New setup also allows us to retain color output while using timestamps.

Before:

time="2021-07-04T19:35:19-07:00" level=info msg="Listing files to watch..."
time="2021-07-04T19:35:19-07:00" level=info msg=" - leeroy-web"
time="2021-07-04T19:35:19-07:00" level=info msg=" - leeroy-app"
time="2021-07-04T19:35:19-07:00" level=info msg="Generating tags..."
time="2021-07-04T19:35:19-07:00" level=info msg=" - leeroy-web -> gcr.io/marlongamez-main/leeroy-web:7c50bd1"
time="2021-07-04T19:35:19-07:00" level=info msg=" - leeroy-app -> gcr.io/marlongamez-main/leeroy-app:7c50bd1"
time="2021-07-04T19:35:19-07:00" level=info msg="Checking cache..."
time="2021-07-04T19:35:21-07:00" level=info msg=" - leeroy-web: Found Remotely"
time="2021-07-04T19:35:21-07:00" level=info msg=" - leeroy-app: Found Remotely"

After:

2021-07-04 19:35:57 Listing files to watch...
2021-07-04 19:35:57  - leeroy-web
2021-07-04 19:35:57  - leeroy-app
2021-07-04 19:35:57 Generating tags...
2021-07-04 19:35:57  - leeroy-web -> 2021-07-04 19:35:57 gcr.io/marlongamez-main/leeroy-web:7c50bd1
2021-07-04 19:35:57  - leeroy-app -> 2021-07-04 19:35:57 gcr.io/marlongamez-main/leeroy-app:7c50bd1
2021-07-04 19:35:57 Checking cache...
2021-07-04 19:35:59  - leeroy-web: 2021-07-04 19:35:59 Found Remotely
2021-07-04 19:35:59  - leeroy-app: 2021-07-04 19:35:59 Found Remotely

@MarlonGamez MarlonGamez requested a review from a team as a code owner July 7, 2021 17:47
@MarlonGamez MarlonGamez requested a review from briandealwis July 7, 2021 17:47
@google-cla google-cla bot added the cla: yes label Jul 7, 2021
@codecov
Copy link

codecov bot commented Jul 7, 2021

Codecov Report

Merging #6146 (410f906) into master (2d766a1) will increase coverage by 0.05%.
The diff coverage is 71.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6146      +/-   ##
==========================================
+ Coverage   69.93%   69.98%   +0.05%     
==========================================
  Files         481      481              
  Lines       18337    18339       +2     
==========================================
+ Hits        12824    12835      +11     
+ Misses       4561     4553       -8     
+ Partials      952      951       -1     
Impacted Files Coverage Δ
cmd/skaffold/skaffold.go 0.00% <0.00%> (ø)
pkg/skaffold/build/result.go 83.33% <0.00%> (ø)
pkg/skaffold/output/output.go 80.00% <81.81%> (-0.65%) ⬇️
cmd/skaffold/app/cmd/cmd.go 71.59% <100.00%> (+2.84%) ⬆️
pkg/skaffold/docker/parse.go 86.19% <0.00%> (-0.96%) ⬇️
pkg/skaffold/output/color.go 95.74% <0.00%> (+4.25%) ⬆️
pkg/skaffold/util/tar.go 56.00% <0.00%> (+5.33%) ⬆️

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 2d766a1...410f906. Read the comment docs.

@MarlonGamez MarlonGamez merged commit a4cf386 into GoogleContainerTools:master Jul 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clean up output when using --timestamps
2 participants