configuration

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLogger

func GetLogger() *zap.Logger

GetLogger return production logger

func Init

func Init(ops Options)

Init global MQTT config with given options if not being called default set by init() is used

func SetLevel added in v0.0.4

func SetLevel(level zapcore.Level)

Types

type Options

type Options struct {
	// LogWithTs either display timestamp messages on log or not
	LogWithTs bool
	// LogLevel options are: debug,info,warn,error,panic,fatal
	LogLevel string
	// LogEnableTrace whether capture the trace info in error and above level logs.
	LogEnableTrace bool
	// LogFilePath the absolute path of the log file. if empty, then stdout will be used.
	LogFilePath string
}

Options global MQTT config

Jump to

Keyboard shortcuts

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