Documentation
¶
Index ¶
- func RegisterFormatter(name string, fn FormatterFunc)
- func RegisterHook(name string, fn HookFunc)
- func RegisterOutput(name string, fn OutputFunc)
- func Tune(logger *logrus.Logger, config Config) error
- type Config
- type FormatterFunc
- type HookFunc
- type OutputFunc
- type ViperAdapter
- func (v ViperAdapter) Get(key string) interface{}
- func (v ViperAdapter) GetBool(key string) bool
- func (v ViperAdapter) GetFloat64(key string) float64
- func (v ViperAdapter) GetInt64(key string) int64
- func (v ViperAdapter) GetList(key string) []string
- func (v ViperAdapter) GetString(key string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterFormatter ¶
func RegisterFormatter(name string, fn FormatterFunc)
RegisterFormatter function register new formatter.
func RegisterHook ¶
RegisterHook function register new hook.
func RegisterOutput ¶
func RegisterOutput(name string, fn OutputFunc)
RegisterOutput register writer.
Types ¶
type Config ¶
type Config interface { Get(key string) interface{} GetString(key string) string GetInt64(key string) int64 GetFloat64(key string) float64 GetBool(key string) bool GetList(key string) []string }
func NewViperAdapter ¶
NewViperAdapter return new instance of viper adapter to use as logruskit Config.
type FormatterFunc ¶
FormatterFunc should use to define new formatter.
type OutputFunc ¶
OutputFunc is function to use for defining new outputs.
type ViperAdapter ¶
type ViperAdapter struct {
// contains filtered or unexported fields
}
func (ViperAdapter) Get ¶
func (v ViperAdapter) Get(key string) interface{}
func (ViperAdapter) GetBool ¶
func (v ViperAdapter) GetBool(key string) bool
func (ViperAdapter) GetFloat64 ¶
func (v ViperAdapter) GetFloat64(key string) float64
func (ViperAdapter) GetInt64 ¶
func (v ViperAdapter) GetInt64(key string) int64
func (ViperAdapter) GetList ¶
func (v ViperAdapter) GetList(key string) []string
func (ViperAdapter) GetString ¶
func (v ViperAdapter) GetString(key string) string
Click to show internal directories.
Click to hide internal directories.