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

Provide a log server configuration providerl #1430

Open
thompson-tomo opened this issue Jan 14, 2025 · 1 comment
Open

Provide a log server configuration providerl #1430

thompson-tomo opened this issue Jan 14, 2025 · 1 comment
Labels
Type/enhancement New feature or request

Comments

@thompson-tomo
Copy link
Contributor

thompson-tomo commented Jan 14, 2025

Is your feature request related to a problem? Please describe.

I want to be able to use the logger actuator provided by steeltoe as a source of configuration for my application

Describe the solution you'd like

Able to register a configuration provider which polls the logger actuator to obtain back the configured loggers so that it can be used with third party logger frameworks

As part of the initialisation of the configuration provider a transformer can be specified.

The transformer is implemented via a public interface which contains a method to transform the response to a structure compatible with the logging providers

Describe alternatives you've considered

Provide data via config server

Additional context

Transformers needed to be available:

  • Microsoft

Additional transformers for the future

  • Serilog
  • Nlog
@thompson-tomo thompson-tomo added the Type/enhancement New feature or request label Jan 14, 2025
@bart-vmware
Copy link
Member

I want to be able to use the logger actuator provided by steeltoe as a source of configuration for my application

What problem does this solve?

Please bear in mind the loggers actuator exists for parity with Spring Boot Admin and Cloud Foundry. It enables to temporarily adjust minimum log levels on a single app instance for diagnosing a problem in production, without the need to restart that server first. Adjustments are stored in-memory and disappear on restart.

The typical scenario in production is increasing the minimum levels on a single app instance, then send a request, then reduce the levels again. Possibly first taking the instance out of the load balancer. This is because higher log levels typically cause severe degradation of performance.

It is not a system to centrally manage minimum levels over multiple app instances. IConfiguration should be used for that, which can read from various sources, including Config Server. Steeltoe v4 adds support for detecting changes in IConfiguration and updates the logger levels on change (unless locally overridden, obviously, then it applies the changed settings on reset). This is all implemented behind IDynamicLoggerProvider and unrelated to the implementation of the loggers actuator.

Given that multiple instances typically have different levels active in time, I don't think it makes sense to somehow merge them and send that back to a central configuration source.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants