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

Reduce log size in development/test environments #5142

Merged
merged 1 commit into from
Jul 3, 2023
Merged

Conversation

javierm
Copy link
Member

@javierm javierm commented Jun 28, 2023

References

Objectives

  • Avoid huge log files (might be even tens of gigabytes) while developing Consul

@javierm javierm self-assigned this Jun 28, 2023
@javierm javierm added this to Reviewing in Consul Democracy Jun 28, 2023
@javierm javierm force-pushed the local_logs branch 3 times, most recently from 7bbb3c0 to a7e0619 Compare June 28, 2023 15:13
Code based on the logger Rails uses by default; as mentioned in the
Rails configuration guide:

> [the logger] defaults to an instance of ActiveSupport::TaggedLogging
> that wraps an instance of ActiveSupport::Logger which outputs a log to
> the log/ directory. You can supply a custom logger, to get full
> compatibility you must follow these guidelines:
>
> * To support a formatter, you must manually assign a formatter from
>   the config.log_formatter value to the logger.
> * To support tagged logs, the log instance must be wrapped with
>   ActiveSupport::TaggedLogging.
> * To support silencing, the logger must include
>   ActiveSupport::LoggerSilence module. The ActiveSupport::Logger class
>   already includes these modules.

Just like the documentation mentions, we're enabling log rotation using
"1" as the number of old files to keep and then the maximum size of the
log file.
Consul Democracy automation moved this from Reviewing to Testing Jul 3, 2023
@taitus taitus self-assigned this Jul 3, 2023
@javierm javierm merged commit 29a3fe4 into master Jul 3, 2023
13 checks passed
Consul Democracy automation moved this from Testing to Release 2.0.0 Jul 3, 2023
@javierm javierm deleted the local_logs branch July 3, 2023 15:27
@javierm javierm removed the 2.0 label Jul 4, 2023
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.

None yet

2 participants