Support writing to structured logs from resource commands
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 991
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 196
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Is your feature request related to a problem? Please describe the problem.
I'm wanting to create a resource command that, when run, dumps out the model information for an Ollama model. I figured the best place to "dump" this would be to logs, but when I resolve a logger (either the `ResourceLoggerService` or the `ILogger`) from the service container that is available in the execution method of the resource command, the log messages end up in the console logs and not structured logs for the resource.
### Describe the solution you'd like
There should be a way to resolve a logger instance which is capable of writing to the structured logs for the resource.
This would also be useful within eventing and life cycle events to provide something that is more human parsable than the raw log stream.
### Additional context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.