Skip to content

Improve Logging Logic #52

@0xNeshi

Description

@0xNeshi

Logging the processes in our service will drastically improve maintainability, for both us and package users, especially because the service is multi-threaded.

Investigate exact crate to rely on for logging, maybe first investigate tracing.

Some general guidelines that we need to discuss and agree upon:

  • the point of logs is:
    • notify the dev what the scanner is doing
    • notify the dev what data the scanner is processing
    • create history of events leading up to an error/bug
  • write meaningful log entries
  • use appropriate log levels:
    • error - failure that needs to be debugged and fixed
    • warning - expected failure that probably doesn't need to be investigated OR part of normal operation.
    • info - useful information during normal and expected operations
    • debug - diagnostic information for development
  • logs should indicate where they originated (block range scanner, event scanner, maybe even the exact function?)
  • logs should contain some sort of trace ID, to enable tracking the chain of events and possibly indicating in which thread/task logs are being emitted

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: lowNice to have, can waitstatus: needs discussionRequires team input before implementationtype: refactorCode improvement without changing functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions