Gorka Guridi
Gorka Guridi
I can't see any problem :)
@potuz the problem relies on the `journalhook` hook that you are using. If it's the same as the [wiki](https://github.com/sirupsen/logrus/wiki/Hooks) references then the problem is that the code is old and...
Each logger you generate has MutexWrap associated with it, that basically is a wrapper over [sync.Mutex](https://golang.org/pkg/sync/#Mutex). Examples of what it is and how to use it are [here](https://gobyexample.com/mutexes). Logrus manages...
What do you mean? Logrus is not able to send email notifications by itself. Are you talking about a hook created by someone else that integrates with Logrus?
The [email hook in watchtower](https://github.com/v2tec/watchtower/blob/05513ddc1e2477ed811f1d94c30e505bf5c86e26/notifications/email.go) is not part of this repository. I'm afraid you will have to open an issue with them regarding how their hook works :S
You can use an intermediary function to retrieve your struct data into log fields: func getFields(i interface{}) logrus.Fields { b, _ := json.Marshal(i) fields := logrus.Fields{} json.Unmarshal(b, &fields) return fields...
I've added a small pull request because I think it would be a nice to have feature.
I don't think this change should be made. The concept of passing a JSON as log message is not right. You don't know who's gonna have to read your log...
Your solution in your last comment is perfect. The problem I see with the pull request is that the changes requested to **meet your needs** are going to affect other...
I think you need to create a hook instead of a writer. But #729 has to be fixed before you can modify log entries in one hook and expect the...