log

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 12, 2018 License: AGPL-3.0 Imports: 7 Imported by: 46

Documentation

Overview

Package log provides a logging backend, based around the go-logging package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

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

Backend is a log backend.

func New

func New(f string, level string, disable bool) (*Backend, error)

New initializes a logging backend.

func (*Backend) GetGoLogger

func (b *Backend) GetGoLogger(module string, level string) *goLog.Logger

GetGoLogger returns a per-module Go runtime *log.Logger that writes to the backend. Due to limitations of the Go runtime log package, only one level is supported per returned Logger.

func (*Backend) GetLogWriter

func (b *Backend) GetLogWriter(module string, level string) io.Writer

GetLogWriter returns a per-module io.Writer that writes to the backend at the provided level.

func (*Backend) GetLogger

func (b *Backend) GetLogger(module string) *logging.Logger

GetLogger returns a per-module logger that writes to the backend.

Jump to

Keyboard shortcuts

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