June 2017
Intermediate to advanced
400 pages
10h 32m
English
These steps cover writing and running your application:
package structured import "github.com/sirupsen/logrus" // Hook will implement the logrus // hook interface type Hook struct { id string } // Fire will trigger whenever you log func (hook *Hook) Fire(entry *logrus.Entry) error { entry.Data["id"] = hook.id return nil } // Levels is what levels this hook will fire on func (hook *Hook) Levels() []logrus.Level { return ...Read now
Unlock full access