Ev.ServiceBus
Ev.ServiceBus copied to clipboard
Improve Logging: Fix Duplicate Entries, Implement High-Performance, Structured
Description
We need to improve the logging mechanism in our package to enhance performance, clarity, and manageability. This issue aims to address several aspects of logging:
Fix Duplicate Log Entries on Exception
Currently, exceptions might lead to duplicate log entries. We need to ensure that each exception is logged only once to avoid clutter and confusion in the logs.
Use High-Performance Logging
Implement high-performance logging as described in the Microsoft documentation. This involves using the LoggerMessage pattern for scenarios where high-frequency logging occurs, thus improving the performance of the logging system.
Use Structured Logs
Shift to structured logging to provide better context and searchability for log entries. This can be achieved by logging structured data instead of simple text messages.