go-zero icon indicating copy to clipboard operation
go-zero copied to clipboard

logx support SetFormatter

Open annidy opened this issue 1 month ago • 0 comments

logx current only support 2 kind of log encoding: json and plain.

can add more flexible log formatter like logrus

for example:

  logx.SetFormatter(&logrus.JSONFormatter{})

so we can use many third-party formatter in project.

annidy avatar May 13 '24 03:05 annidy