atmos icon indicating copy to clipboard operation
atmos copied to clipboard

Atmos Logs Should Not Emit Color Codes when Writing to Files (non-tty devices)

Open osterman opened this issue 7 months ago • 1 comments

Describe the Bug

When atmos is configured to log to a file, color output should be supressed.

Might be able ot use

https://pkg.go.dev/github.com/charmbracelet/colorprofile#Detect

Image

Expected Behavior

Color output should be supressed.

Steps to Reproduce

Change atmos configuration:

logs:
  file: /tmp/test.log

Run atmos with a TTY attached, and observe color codes in the logs.

Screenshots

No response

Environment

No response

Additional Context

No response

osterman avatar Apr 10 '25 19:04 osterman

https://sweetops.slack.com/archives/C031919U8A0/p1744307911977809?thread_ts=1744307873.206619&cid=C031919U8A0

osterman avatar Apr 10 '25 19:04 osterman