lmittmann/tint

Log files

Closed this issue · 2 comments

Hi, i've noticed that it is not possible for tint to have a log file, due to the colors appearing in the log file. This is because io.MultiWriter is used for log.SetOutput, and if used, sends logs to stdout and a log file. Issue with that is colors will be retained and the log file will not look great.

Is it possible for tint to introduce a MultiLogger so that the Stderr can look nice, while the log file remains readable?

Take a look at https://github.com/samber/slog-multi. You can use it with the tint handler.

Thanks!