We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, I was trying to couple log with io.Multiwriter and noticed that the colors are gone.
log
package main import ( "io" "os" "path" "time" "github.com/charmbracelet/log" "gopkg.in/natefinch/lumberjack.v2" ) func NewRollingFile(dir string) io.Writer { if dir != "" { if err := os.MkdirAll(dir, 0o744); err != nil { log.Error(err, "path", dir) return nil } } else { dir = "." } return &lumberjack.Logger{ Filename: path.Join(dir, "test"), MaxAge: 7, // days } } func main() { writers := []io.Writer{} writers = append(writers, os.Stderr) writers = append(writers, NewRollingFile("dir")) writer := io.MultiWriter(writers...) logger := log.NewWithOptions(writer, log.Options{ ReportCaller: true, ReportTimestamp: true, TimeFormat: time.Kitchen, }) logger.Info("this is a test") }
The text was updated successfully, but these errors were encountered:
#69 will probably solve this
Sorry, something went wrong.
Can confirm this issue still persists as no fixes have been proposed yet.
#69 is now part of v0.2.5
this solves the issue for me, thanks
No branches or pull requests
Hi,
I was trying to couple
log
with io.Multiwriter and noticed that the colors are gone.The text was updated successfully, but these errors were encountered: