luckyframework / luckyframework/dexter

Allow reconfiguring log level on a per Fiber basis

Open
#25 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Crystal
Stars
21
Forks
4
PR merge metrics
No merged PRs in 30d

Description

Let's say in production you set the log level to `info`. Then a user reports a problem and you want to change the log level to `debug` *just* for you while you poke around.

I am not sure what the API looks like but I'd almost want to do something like

```crystal
if params.get?(:enable_super_special_log_just_for_me)
Log.current_fiber_level = :debug # Sets all logs to `:debug` *just* for the current Fiber
end
```

In a handler, before pipe, whatever. This would be super handy and I'd like to build something in for this at some point. So you can use Breeze in production but just with a special token set in the query param or a header

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue names no files, tests, or entry points. Start by locating the logger configuration and how Fiber-local state is handled, then define an API for overriding the production log level only within the current Fiber. Done means a request can enable debug logging for itself without changing log levels for other Fibers.

Written by the indexing model from the issue text.

Assessment

Tech stack
crystal
Domain
observability
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.