Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateLogger ¶
CreateLogger creates a new logger with a name prefix
func SetFormatter ¶ added in v2.1.2
SetFormatter sets the log formatter
Types ¶
type LogNameHook ¶
type LogNameHook struct {
// contains filtered or unexported fields
}
LogNameHook is a logrus hook to a
func NewNameHook ¶
func NewNameHook(name string) *LogNameHook
NewNameHook creates a new hook to add name to entry fields
func (*LogNameHook) Fire ¶
func (h *LogNameHook) Fire(entry *logrus.Entry) error
Fire is triggered on log entry
func (*LogNameHook) Levels ¶
func (h *LogNameHook) Levels() []logrus.Level
Levels specifies the levels of the hook
Click to show internal directories.
Click to hide internal directories.