base

package
v0.0.0-...-4fa730b Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(message string, fields ...zap.Field)

Debug logs a debug message with the given fields

func Error

func Error(message string, fields ...zap.Field)

Error logs a debug message with the given fields

func Fatal

func Fatal(message string, fields ...zap.Field)

Fatal logs a message than calls os.Exit(1)

func GenerateNameID

func GenerateNameID() (string, error)

GenerateNameID -

func Info

func Info(message string, fields ...zap.Field)

Info logs a debug message with the given fields

func InitLogger

func InitLogger() (err error)

InitLogger - initializes a thread-safe singleton logger

func LoadConfig

func LoadConfig(filename string, basedir string) (err error)

LoadConfig - load config

func MakePath

func MakePath(dir string) error

MakePath -

func Warn

func Warn(message string, fields ...zap.Field)

Warn logs a debug message with the given fields

Types

type Config

type Config struct {
	WebServAddr  string
	CoreGrpcAddr string
	PeerAddr     string
	LogPath      string
	ErrPath      string
	LogLevel     string
	DbPath       string
	CoreDbName   string
}

Config - config

func GetConfig

func GetConfig() *Config

GetConfig - get Config

Jump to

Keyboard shortcuts

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