Even though I set ForceColors=true, still can't output a coloured logging on the terminal. But I can use the ASNI code to output successfully. e.g fmt.Println("\u001b[31m" + "Hello World!" + "\u001b[0m")
Maybe
I think the problem may be that it may be that the output is not tty.
Is there any solution to this? I would appreciate it.
Attempt
After some experimentation, I found that "github.com/zput/zxcTool/ztLog/zt_formatter" could achieve the effect of color the section of LogLevel
Question
Even though I set ForceColors=true, still can't output a coloured logging on the terminal. But I can use the ASNI code to output successfully. e.g
fmt.Println("\u001b[31m" + "Hello World!" + "\u001b[0m")
Maybe
I think the problem may be that it may be that the output is not tty. Is there any solution to this? I would appreciate it.
Attempt
After some experimentation, I found that "github.com/zput/zxcTool/ztLog/zt_formatter" could achieve the effect of color the section of LogLevel