community: github.com/documize/community/edition/logging Index | Files

package logging

import "github.com/documize/community/edition/logging"

Package logging defines application-wide logging implementation.

Index

Package Files

logger.go

func NewLogger Uses

func NewLogger(trace bool) env.Logger

NewLogger returns initialized logging instance.

type Logger Uses

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

Logger is how we log.

func (Logger) Error Uses

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

Error logs error with message.

func (Logger) Info Uses

func (l Logger) Info(message string)

Info logs message.

func (Logger) Infof Uses

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

Infof logs message via Sprintf.

func (Logger) SetDB Uses

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 Uses

func (l Logger) Trace(message string)

Trace logs message if tracing enabled.

Package logging imports 7 packages (graph) and is imported by 1 packages. Updated 2018-11-08. Refresh now. Tools for package owners.