Open
Description
What do you want to ask?
We are using logrus and logging like this:
log.Info("A simple log")
log.WithFields(log.Fields{
"event": event,
"user_id": userId,
}).Info("A log with fields")
And it produce json logs like below:
{
"log": "A simple log"
}
{
"event": "event",
"user_id": "user_id",
"log": "A log with fields"
}
So we can use the fields to filter our logs such as:
select log
where user_id = 1 and event = "event"
Do GoFrame support this? Or how can I implement something like this in GoFrame?