Open Nana-EC opened 1 year ago
Summary of My Understanding:
From what I understand, the issue focuses on improving performance by preventing unnecessary string generation in
debug
andtrace
logs when these logging levels are disabled. The proposed solution involves adding log level guards (if-statements) to ensure string generation only occurs when the logging level is enabled. Iβm looking to confirm my understanding of the requirements before proceeding.Here are some questions Iβd appreciate clarification on:
- Could you please confirm if the main issue is related to performance inefficiencies caused by unnecessary string generation, or are there additional concerns such as incorrect logging levels being used?
- Should the log level guards be implemented for both
debug
andtrace
logs, or are there additional logging levels we should consider when applying the guards?- Could you guide me to the specific files or modules where the majority of these unguarded logs appear, or should I apply the changes across all components of the relay?
- Are there any existing unit or integration tests related to logging behavior that I should reference when adding log level guards? If not, would you recommend adding test coverage for this?
- Is there a preferred pattern or convention for adding if-statement guards in this project to maintain consistency, or should I follow the example provided in the pino documentation?
- Iβve already expressed my interest in this issue. Could you provide a rough timeline for when I might expect to be officially assigned so I can plan accordingly?
ππ₯ First Timers Only
This issue is reserved for people who have never contributed to Hedera or any open source project in general. We know that creating a pull request (PR) is a major barrier for new contributors. The goal of this issue and all other issues labeled by 'Good First Issue' is to help you make your first contribution to Hedera.
πΎ Description of the issue
The relay utilizes
debug
andtrace
logs without guarding (if-statements). This can result in unnecessary string generation when such levels are not applicableProposed Solution:
Add log level considerations and guard appropriately See https://github.com/pinojs/pino/blob/master/docs/api.md#loggerislevelenabledlevel
π Step by step guide to do a contribution
If you have never contributed to an open source project at GitHub, the following step-by-step guide will introduce you to the workflow. More information and concrete samples for shell commands for each step can be found in our CONTRIBUTING.md file. A more detailed general documentation of the GitHub PR workflow can be found here.
sign-off
information to the commit to accept the "Developer Certificate of Origin" (https://developercertificate.org). More details can be found in our CONTRIBUTING.mdπ Contribute to Hacktoberfest
Solve this issue as part of the Hacktoberfest event and get a chance to receive cool goodies like a T-Shirt. π½
π€ Additional Information
If you have any questions, just ask us directly in this issue by adding a comment. You can join our community chat at Discord. A general manual about open-source contributions can be found here.