Distinguish Sink Name from Sink Type in Logger Configuration
Right now, our logger config uses a single sink field, and that can be a bit confusing. The problem is that this field might be something like "sys.stdout" or "elasticsearch", but it could also just be a file path like "logs/app.log".
Because it tries to handle everything in one place, it’s not always clear what kind of sink we’re dealing withis it a special type or just a file? This gets even trickier when we want to extend the config or override values using environment variables, since the meaning of sink isn’t always obvious.
It works for now, but it’s something to keep in mind as we think about making the config cleaner or more flexible in the future.
Refactor the logger configuration to explicitly separate sink attributes, for example:
sink:
name: "main_log"
type: "file" # or "stdout", "elasticsearch", etc.
location: "/var/log/app.log" # only for file sinks
# ...other sink-specific parameters