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
#69 Didn't fix the issue not in my case. I can't seem to get colors working unless setting color file to termenv.TrueColor. Os: Arch Linux
package main import ( "github.com/charmbracelet/log" "io" "os" "time" // "github.com/muesli/termenv" ) func main() { file := "logger.log" LogFile, err := os.OpenFile(file, os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0644) if err != nil { panic(err) } writers := []io.Writer{} writers = append(writers, os.Stderr) writers = append(writers, LogFile) writer := io.MultiWriter(writers...) // OR io.MultiWriter(LogFile, os.Stdout) Options := log.Options{ TimeFunction: time.Now, TimeFormat: time.DateTime, ReportTimestamp: true, Level: log.InfoLevel, Prefix: "Logging 👾 ", } logger := log.NewWithOptions(writer, Options) // logger.SetColorProfile(termenv.TrueColor) // Works logger.Info("this is a test") }
The text was updated successfully, but these errors were encountered:
#84 solved a related issue i had, you may want to give it another swing using latest main branch and you may see that it works nwo.
Sorry, something went wrong.
@dezren39 Thanks for the info, it sure did fix it
How did you manage to fix it? can you give more details please.
No branches or pull requests
#69 Didn't fix the issue not in my case. I can't seem to get colors working unless setting color file to termenv.TrueColor.
Os: Arch Linux
The text was updated successfully, but these errors were encountered: