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
Disable Request Logging #1940
Comments
Thanks for opening this issue. A contributor should be by to give feedback soon. In the meantime, please check out the contributing guidelines and explore other ways you can get involved. |
Not sure if it's helpful, but if NODE_ENV is set to In addition, you can overwrite the logger with the new Probot({
log: myLogger,
...probotOptions,
}); Here's a helper function we use internally for this: https://github.com/probot/probot/blob/master/src/helpers/alias-log.ts |
@AaronDewes I found that even in production it still pretty prints an output 🤔 This may be because it's not logging at the probot/context level but instead at the octokit level. There's a request logger plugin that is applied to the octokit instance that always pretty prints for me: https://github.com/probot/probot/blob/master/src/octokit/octokit-plugin-probot-request-logging.ts and here's where it gets applied probot/src/octokit/probot-octokit.ts Line 47 in 02d81f8
|
Can you check if this also happens on |
I tried out |
Is there a way to replace the octokit instance? That way I can pass in an octokit with that plugin removed |
I was able to swap out the logging instance on the Octokit by passing in some default options.
Thanks for the help @AaronDewes |
Some may be normal as we are shipping some breaking changes. There isn't a changelog as of yet, but if you look at the PR #1874 it should give you a good idea. If you have any questions/issues, please feel free to make a new issue for that. |
Imho you need to set the log level to |
Bug Report
Current Behavior
I want to standardize all my outputs to be JSON so that log processors like fluentbit will be able to consume them and format them properly.
There currently exists a hook that requests all logging and I want a way to disable it.
https://github.com/probot/probot/blob/master/src/octokit/octokit-plugin-probot-request-logging.ts
Expected behavior/code
No more log output from requests
Environment
Possible Solution
We can add a configuration option to disable request logging
Additional context/Screenshots
Add any other context about the problem here. If applicable, add screenshots to help explain.
The text was updated successfully, but these errors were encountered: