avaje / avaje-config

Application configuration / properties loading for JVM applications
https://avaje.io/config
Apache License 2.0
55 stars 8 forks source link

Change from System.Logger to use events and control how those events are logged. #47

Closed rbygrave closed 1 year ago

rbygrave commented 1 year ago

What our config framework provides is a simple event system. When logging is done you can drain the queue of events usually replaying them to logging our System.err.

The reason for doing this is because sometimes we want the configuration to load completely BEFORE any logging is used. This allows the configuration to put things into System Properties which is used to configure the actual logging.

SentryMan commented 1 year ago

use events

so the first thing that comes to mind is to take the logs we output and keep them in a List somewhere. From there we could provide a method for users to log themselves. Am I on the right track?

rbygrave commented 1 year ago

Yes, well an "event" is something like a System.Logger.LEVEL + message (+ maybe a code if we want some business logic to work off codes rather than message content).