-
Notifications
You must be signed in to change notification settings - Fork 17
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
Add a ConfigurationMethod to Populate ResourceAttributes-dictionary from appsettings.json #107
Comments
Hi! I think the intended path for this is serilog/serilog-settings-configuration#398 - and some help over there would be most welcome if you have the opportunity. I can see the place for |
Ah, I didn't think to look there, as I assumed it would be Otel-specific. :-) I think maybe 0xced's suggestion is a bit ... ambitious ... compared to say FileLoggerConfigurationExtensions, where all (?) the possible configuration combinations have been brute-forced into extension methods, which are easily understood and require a fair bit less testing - and would not have to deal with options that refer to object instances like the LevelSwitch. |
See also #123, just merged, which will support the changes in Serilog.Settings.Configuration. |
Solved by Serilog config PR #405. Horray 🎉 |
When using
new LoggerConfiguration().ReadFrom.Configuration(config)
I would like to be able to assign values to ResourceAttributes: I'm thinking something likeOf course that doesn't work without a little help. I pulled the source and built it into the existing ConfigurationExtension like so
It works but is sort of hard to unittest without resorting to reflection. Could the above be integrated into the project? Or is there a better way to do what I propose?
The text was updated successfully, but these errors were encountered: