Commit Graph

3 Commits

Author SHA1 Message Date
Mikel Blanchard 952c3b17fc
[Logs] Support dependency injection in logging build-up (#3504)
* Support dependency injection in logging. Add AddOpenTelemetryEventSourceLogEmitter extension.

* CHANGELOG update.

* Bug fixes and a test.

* More fixes and more tests.

* Tweak comments for clarity.

* Added OpenTelemetryLoggerOptions.Services xml detail remarks.

* More tests.

* More tests.

* Test fix.

* More tests.

* Tests and fixes.

* Warning cleanup.

* Added resource test.

* Smooth out multiple resource configurations.

* Resource chaining fix.

* Remove throw for additional SetResourceBuilder calls.

* Warning fixes.

* Moved OpenTelemetryEventSourceLogEmitter extension to OpenTelemetryLoggerOptions.

* Tweaks.

* Switched from static to builder pattern.

* Tweaks.

* More tests.

* Fix CHANGELOG for release.

* Tweaks.

* Test updates.

* Added a detached configuration option.

* Prevent double registration to be consistent with tracer builder pattern.

* API review.

* Warning cleanup.

* Build fixes.

* Test fix.
2022-08-05 17:56:04 -07:00
Mikel Blanchard ab10e119ba
[Logs] Serilog extensions project (#3438)
* Add Serilog extensions project.

* Improve provider disposal when using serilog.

* Warning fixes.

* Fix README.

* Code review.

* Move Serilog version to props.

* Rename LogEmitter.Log -> Emit.

* Added unit tests.

* Warning cleanup.

* Code review.

* Standard README jazz.

* Removed ApiCompat block.
2022-07-18 09:38:02 -07:00
Mikel Blanchard be588bdcd3
Logs: Add LogEmitter API (#3423)
* Add LogEmitter API.

* Added LogEmitter tests.

* Updated to NOT push ILogger scopes onto LogRecords created through LogEmitter.

* Timestamp tests.

* LogRecordAttributeList tests + bug fix.

* Warning cleanup.

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2022-07-11 08:59:44 -07:00