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

Turn on Traefik access logs #7109

Merged
merged 1 commit into from
Nov 17, 2023
Merged

Turn on Traefik access logs #7109

merged 1 commit into from
Nov 17, 2023

Conversation

SpecLad
Copy link
Contributor

@SpecLad SpecLad commented Nov 7, 2023

Motivation and context

This will be useful for debugging issues and gathering statistics.

Use the JSON format, since that allows us to include more information than the traditional HTTP access logs. Switch the other logs to JSON as well, for ease of parsing.

How has this been tested?

Manual testing.

Checklist

  • I submit my changes into the develop branch
  • [ ] I have created a changelog fragment
  • [ ] I have updated the documentation accordingly
  • [ ] I have added tests to cover my changes
  • [ ] I have linked related issues (see GitHub docs)
  • [ ] I have increased versions of npm packages if it is necessary
    (cvat-canvas,
    cvat-core,
    cvat-data and
    cvat-ui)

License

  • I submit my code changes under the same MIT License that covers the project.
    Feel free to contact the maintainers if that's a concern.

@SpecLad SpecLad force-pushed the traefik-logs branch 2 times, most recently from 7e542b7 to af1907b Compare November 7, 2023 16:52
@SpecLad SpecLad marked this pull request as ready for review November 10, 2023 14:47
Copy link

codecov bot commented Nov 10, 2023

Codecov Report

Merging #7109 (e3ced1e) into develop (f1f6e78) will decrease coverage by 0.03%.
The diff coverage is n/a.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #7109      +/-   ##
===========================================
- Coverage    81.42%   81.40%   -0.03%     
===========================================
  Files          364      364              
  Lines        39904    39904              
  Branches      3699     3699              
===========================================
- Hits         32491    32483       -8     
- Misses        7413     7421       +8     
Components Coverage Δ
cvat-ui 75.48% <ø> (-0.05%) ⬇️
cvat-server 86.94% <ø> (ø)

@@ -224,6 +224,22 @@ services:
container_name: traefik
restart: always
command:
- '--log.format=json'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't seem to work if use with docker-compose.https.yml.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. Fixed.

This will be useful for debugging issues and gathering statistics.

Use the JSON format, since that allows us to include more information than
the traditional HTTP access logs. Switch the other logs to JSON as well, for
ease of parsing.

Add a cap on the size of the log in Docker compose, since the JSON logs are
pretty bulky, and we don't want users to inadvertently run out of space.
@SpecLad
Copy link
Contributor Author

SpecLad commented Nov 16, 2023

I added a log file size cap too.

@SpecLad SpecLad merged commit 6ae1cff into cvat-ai:develop Nov 17, 2023
34 checks passed
@SpecLad SpecLad deleted the traefik-logs branch November 17, 2023 10:36
This was referenced Nov 22, 2023
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.

2 participants