logging

package
v2.2.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2019 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package logging defines application-wide logging implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLogger

func NewLogger(trace bool) env.Logger

NewLogger returns initialized logging instance.

Types

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

Logger is how we log.

func (Logger) Error

func (l Logger) Error(message string, err error)

Error logs error with message.

func (Logger) Info

func (l Logger) Info(message string)

Info logs message.

func (Logger) Infof added in v1.72.0

func (l Logger) Infof(message string, a ...interface{})

Infof logs message via Sprintf.

func (Logger) SetDB

func (l Logger) SetDB(logger env.Logger, db *sqlx.DB) env.Logger

SetDB associates database connection with given logger. Logger will also record messages to database given valid database connection.

func (Logger) Trace added in v1.56.0

func (l Logger) Trace(message string)

Trace logs message if tracing enabled.

Jump to

Keyboard shortcuts

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