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

allow disabling logs #330

Closed
verygoodsoftwarenotvirus opened this issue Jan 3, 2024 · 1 comment · Fixed by #332
Closed

allow disabling logs #330

verygoodsoftwarenotvirus opened this issue Jan 3, 2024 · 1 comment · Fixed by #332
Assignees
Labels
status: oncall Flagged for awareness from Honeycomb Telemetry Oncall type: enhancement

Comments

@verygoodsoftwarenotvirus

Is your feature request related to a problem? Please describe.
We use honeytail to forward logs to honeycomb from our ECS containers. In the ECS logs (which I have to look at sometimes as not all logs are forwarded), we keep seeing a ton of log lines caused by this line. These logs pollute the log stream and make it harder to find other relevant logs outside of the Honeycomb interface.

Describe the solution you'd like
I'd love to be able to set an env var (i.e. HONEYTAIL_NO_LOG) that would prevent these logs from being written at all.

Describe alternatives you've considered
I've contemplated not using honeytail at all for logs, but migration away from the status quo is just not something we have capacity for at the moment.

Additional context
n/a

@MikeGoldsmith MikeGoldsmith added the status: oncall Flagged for awareness from Honeycomb Telemetry Oncall label Jan 24, 2024
@MikeGoldsmith
Copy link
Contributor

Hey @verygoodsoftwarenotvirus - thanks for raisng the issue and sorry for the delay in responding.

I've put together #332 to help with the problem you're facing. With it, you can set the desired log level to omit the log entries you're not interested in.

@MikeGoldsmith MikeGoldsmith self-assigned this Jan 29, 2024
MikeGoldsmith added a commit that referenced this issue Jan 29, 2024
## Which problem is this PR solving?
Honeytail logs a summary of every batch of events sent to Honeycomb.
These are very repetitive and obscure other information if there was a
problem sending events. The summaries are logged at the `INFO` level
using logrus.

This PR adds a log level configuration option that allows users to set
their desired log level in the logging framework logrus. The usage of
info level was verified to not contain critical information if there was
a problem, with more important logs using a higher log level (eg
`error`).

- Closes #330 

## Short description of the changes
- Add new `log_level` option, defaulting to `info`
- If the new option has a value, attempt to set that log level in logrus

This was tested by setting the `log_level` flag after building the tool
locally. As we use flag parsing in main file, it's not easy to write
unit tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: oncall Flagged for awareness from Honeycomb Telemetry Oncall type: enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants