onflow / flow-go

A fast, secure, and developer-friendly blockchain built to support the next generation of games, apps, and the digital assets that power them.
GNU Affero General Public License v3.0
533 stars 178 forks source link

Mercilessly refactor `panic()` calls into `zerolog` `.Panic()` calls #2891

Closed simonhf closed 1 month ago

simonhf commented 2 years ago

Problem Definition

Currently zerolog is used for all logging to JSON format except for panic() calls which get output as non-JSON. This is a source of inconsistency in the logging.

Proposed Solution

zerolog has its own .Panic() function which does everything that panic() does and outputs the zerolog formatted JSON log line too.

Definition of Done

No more panic() statements.

simonhf commented 2 years ago

More info here [1].

[1] https://www.notion.so/dapperlabs/Comprehend-logs-forward-port-debug-logs-804323ea1973438ea0671998df2484bf

github-actions[bot] commented 1 month ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.