me

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

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

Go to latest
Published: Jun 17, 2015 License: MIT Imports: 8 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Concat

func Concat(key, seperator, value string) string

func Err

func Err(err error, msg string, data ...*KV) error

func FirstErr

func FirstErr(values ...error) error

func GetErrorMessage

func GetErrorMessage(e interface{}) string

rename - ErrorMessage

func LogDebug

func LogDebug(l logging.LoggerBasic, m string, kv ...*logging.KV)

func LogError

func LogError(l logging.LoggerBasic, m string, err error, kv ...*logging.KV)

func LogInform

func LogInform(l logging.LoggerBasic, m string, kv ...*logging.KV)

func LogRecoveredPanic

func LogRecoveredPanic(l logging.LoggerBasic, m string, p interface{}, kv ...*logging.KV)

func LogWarn

func LogWarn(l logging.LoggerBasic, m string, kv ...*logging.KV)

func LogWillPanic

func LogWillPanic(l logging.LoggerBasic, m string, err error, kv ...*logging.KV)

func NewErr

func NewErr(msg string, data ...*KV) error

func SetConf

func SetConf(c *AppConf)

func SetGlobalLogger

func SetGlobalLogger(l logging.LoggerBasic)

func StackTrace

func StackTrace(er interface{}) string

StackTrace get the stack trace, if inside of a panic recover, will return the stack that called the panic r the data returned from the panic

Types

type AppConf

type AppConf struct {
	// Environment - stage, prod, dev
	Environment string `json:"environment"`
	// Name - MyAppName
	Name string `json:"name"`
}

type Application

type Application interface {
	Environment() string
}

type KV

type KV struct {
	Key   string      `json:"key"`
	Value interface{} `json:"value"`
}

type Program

type Program struct {
	// contains filtered or unexported fields
}
var App *Program

func (*Program) Environment

func (p *Program) Environment() string

func (*Program) Name

func (p *Program) Name() string

type ProgramValues

type ProgramValues struct {
	IPAddresses []net.Addr
}

Jump to

Keyboard shortcuts

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