diff options
| author | Paul Buetow <paul@buetow.org> | 2025-06-20 09:54:37 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-06-20 09:54:37 +0300 |
| commit | b0a1e7928d5147d2a9fe0df710bf7c75a777e0d0 (patch) | |
| tree | 8e90cac2bcf9691a1efd8d8f004e4dc119a9ac76 /internal/io/dlog/dlog.go | |
| parent | ecc66fcf9241c429cf2378f09793ecef3a00b098 (diff) | |
Fix missing colored output in dcat serverless mode
- In serverless mode, output was written directly to stdout bypassing color processing
- Created ColorWriter wrapper that applies colors before writing to stdout
- Updated brush.Colorfy to also color severity levels (ERROR, WARN, FATAL) in plain text
- Ensured --plain flag still disables colors as expected
- Updated integration tests to use --noColor flag to get predictable output
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat (limited to 'internal/io/dlog/dlog.go')
| -rw-r--r-- | internal/io/dlog/dlog.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/io/dlog/dlog.go b/internal/io/dlog/dlog.go index 044624e..6403f77 100644 --- a/internal/io/dlog/dlog.go +++ b/internal/io/dlog/dlog.go @@ -248,7 +248,8 @@ func (d *DLog) Raw(message string) string { d.logger.Raw(time.Now(), message) return message } - d.logger.RawWithColors(time.Now(), message, brush.Colorfy(message)) + coloredMessage := brush.Colorfy(message) + d.logger.RawWithColors(time.Now(), message, coloredMessage) return message } |
