Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: env_logger ~> tracing_subscriber #997

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

de-sh
Copy link
Contributor

@de-sh de-sh commented Nov 21, 2024

Starts implementing #139

env_logger

  • Simple Logging:
    1. Filters log messages based on environment variables (e.g., RUST_LOG).
    2. Outputs log messages in a human-readable format.\
  • Compatibility: Works seamlessly with crates that use the log crate for emitting log messages.
  • Configuration: Easy setup with minimal dependencies.

tracing_subscriber

  • Advanced Tracing:
    1. Supports spans, which represent scopes of work and can include nested spans for hierarchical logging.
    2. Collects rich metadata about events and spans (e.g., source location, fields, etc.).
    3. Allows dynamic configuration and advanced filtering (e.g., by span, field, or metadata).
  • Subscribers:
    1. Provides customizable subscribers for processing trace data (e.g., fmt, json, or custom handlers).
    2. Offers flexibility in output formats, including JSON or custom formats.
  • Integration: Works with other tools like tracing-opentelemetry for distributed tracing.

Before
Screenshot 2024-11-21 at 3 19 02 PM

After
Screenshot 2024-11-21 at 3 23 28 PM

@de-sh de-sh marked this pull request as ready for review November 21, 2024 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant