logging

package
v0.0.0-...-0aebffb Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2017 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Level int
}

func ConfigFromOpts

func ConfigFromOpts() *Config

Returns a new Config struct populated with the configuration values read from the command line or environment variables

type Logs

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

func New

func New(cfg *Config) *Logs

func (*Logs) ERR

func (logs *Logs) ERR(message string, args ...interface{})

func (*Logs) L1

func (logs *Logs) L1(message string, args ...interface{})

func (*Logs) L2

func (logs *Logs) L2(message string, args ...interface{})

func (*Logs) L3

func (logs *Logs) L3(message string, args ...interface{})

func (*Logs) SQL

func (logs *Logs) SQL(sql string, args ...interface{})

func (*Logs) WithSection

func (logs *Logs) WithSection(section string) func()

Sets a scoped log section and returns a functor that should be deferred that resets the log section to its previous scope

Jump to

Keyboard shortcuts

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