Commit e50dc08
fix: enable colored loguru output for terminal display (#189)
* fix: enable loguru color output for terminal display
loguru's default handler does not emit ANSI color codes in non-TTY or
certain terminal environments. Explicitly configure a stderr sink with
colorize=True so that log output is colored regardless of the runtime
context.
When logfire is available, the colorized stderr sink is added alongside
the logfire handler so both destinations receive output.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* refactor: move loguru handler setup before try block
Per review feedback, logger.remove() and logger.add(sys.stderr, colorize=True)
are always executed regardless of logfire availability, so move them before
the try block for cleaner control flow.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Meta42 <mi@mideMacBook-Pro.local>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent eddc5eb commit e50dc08
1 file changed
Lines changed: 8 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
11 | 18 | | |
12 | 19 | | |
13 | 20 | | |
14 | 21 | | |
| 22 | + | |
15 | 23 | | |
16 | 24 | | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | 25 | | |
22 | 26 | | |
23 | 27 | | |
| |||
0 commit comments