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

skip logging when healthcheck url is called #75

Merged
merged 1 commit into from
Jun 3, 2019
Merged

skip logging when healthcheck url is called #75

merged 1 commit into from
Jun 3, 2019

Conversation

compleatang
Copy link

This PR closes #74.

I wasn't sure organizationally the best fit in terms of location for the skip function, so I added it into middleware.go with the other middleware functions.

I also took the opportunity to add the /ping endpoint as a constant just to DRY it up a bit. Tested locally and it works as expected.

@gulien
Copy link
Collaborator

gulien commented May 24, 2019

Hello @compleatang,

Thank you for this PR! I wonder if it should be enable/disable through an environment variable like SKIP_HEALTHCHECK_LOGGING

@compleatang
Copy link
Author

@gulien should be all set now.

@gulien
Copy link
Collaborator

gulien commented May 27, 2019

Actually the environment variable should be retrieved in the main.go. See how I do it with DEFAULT_WAIT_TIMEOUT to understand how I use it in the API afterward 😄

@compleatang
Copy link
Author

Pending tests passing should be all set now.

@compleatang
Copy link
Author

Not really sure what's happening with that test failure. I cannot see why the simple change would cause that test to fail and on my local machine I cannot recreate the failure. Unfortunately I do not have permissions to rerun it to see if there is a kink in the matrix.

Signed-off-by: Casey Kuhlman <casey@monax.io>
@compleatang
Copy link
Author

FWIW, I pushed a commit that mirrors origin/master and the travis job failed at the same place -> https://travis-ci.org/compleatang/gotenberg/jobs/537723905

@gulien
Copy link
Collaborator

gulien commented May 28, 2019

Sorry for the delay @compleatang. I'll try to take a look at your PR next week, I'm quite busy atm.

@compleatang
Copy link
Author

No prob!

@gulien gulien changed the base branch from master to 5.1.0-dev June 3, 2019 08:40
@gulien gulien merged commit 973681a into gotenberg:5.1.0-dev Jun 3, 2019
gulien added a commit that referenced this pull request Jun 3, 2019
…ISTEN_PORT (#78)

* skip logging when healthcheck url is called; closes #74 (#75)

Signed-off-by: Casey Kuhlman <casey@monax.io>

* Configure listen port via environment variable (#77)

* skip logging when healthcheck url is called; closes #74

Signed-off-by: Casey Kuhlman <casey@monax.io>

* skip logging when healthcheck url is called; closes #74

Signed-off-by: Casey Kuhlman <casey@monax.io>

* adds the ability to establish the listen port via env var

Signed-off-by: Casey Kuhlman <casey@monax.io>

* minor refactoring of @compleatang work

* fixing typo
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.

None yet

2 participants