loggergo

package module
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 7, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

README

Build Status

logger-go

Accelbyte logger library

usage

	logger := InitLogger(serviceName, realm)

    logger.Errorf("err")
    // output: time="2020-04-03T16:37:45+07:00" level=error msg=err file="logger_test.go:21" func=logger-go.TestServiceNameLogged realm=def service=abc

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitLogger

func InitLogger(
	serviceName string,
	realm string,
) *logrus.Entry

Types

type ContextHook

type ContextHook struct {
	Data logrus.Fields
}

func (ContextHook) Fire

func (hook ContextHook) Fire(entry *logrus.Entry) error

func (ContextHook) Levels

func (hook ContextHook) Levels() []logrus.Level

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL