← Back to Pull requests

:fire: Feature: Add AllLogger to Config #3153

Closed
unknown closed this pull request without merging on Dec 01, 2024 12:32 UTC
View on GitHub
unknown unknown commented on Oct 02, 2024 08:45 UTC
Author

Description

This adds a new field for the middleware/logger to allow users to pass in a logger with fiber logger interface.
To use the fiber logger interface, users need to define how the logger will be used in LoggerFunc.
Otherwise, it falls back to use original fmt.Sprintf logger instance.

Fixes #2737

Changes introduced

  • Examples: Provide examples demonstrating the new features or changes in action.
  • Type of change

  • New feature (non-breaking change which adds functionality)

  • Enhancement (improvement to existing features and functionality)
  • Checklist

    Before you submit your pull request, please make sure you meet these requirements:

  • Followed the inspiration of the Express.js framework for new functionalities, making them similar in usage.

  • Conducted a self-review of the code and provided comments for complex or critical parts.

  • Updated the documentation in the /docs/ directory for Fiber's documentation.

  • Added or updated unit tests to validate the effectiveness of the changes or new features.

  • Ensured that new and existing unit tests pass locally with the changes.

  • Verified that any new dependencies are essential and have been agreed upon by the maintainers/community.

  • Aimed for optimal performance with minimal allocations in the new code.

  • Provided benchmarks for the new code to analyze and improve upon.
  • Commit formatting

    Please use emojis in commit messages for an easy way to identify the purpose or intention of a commit. Check out the emoji cheatsheet here: CONTRIBUTING.md

    Diff: 218 lines (+163 / -55) across 2 files Reviewer: haochunchang Review duration: 86627m
    All Vouch review confidence checks passed
    Residual risk 0.24 = Change Risk (0.60) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.60 · 218 lines diff across 2 files
    0.60
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.322
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.060
    Real PR Conversation Timeline
    1 comments
    "Review active on #3153"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed sensitive_module
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 59.9% (MEDIUM) · Higher = larger blast radius
    59.9%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 23.6% · Safe to merge
    23.6%
    Repository