logutils

package
v1.39.1 Latest Latest
Warning

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

Go to latest
Published: May 15, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package logutils contains an initializer to configure zap.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Configure

func Configure(level string, format string, opts ...Option) zap.Config

Configure configures the shared default logger.

func ConfigureWithName

func ConfigureWithName(serviceName string, level string, format string) zap.Config

ConfigureWithName configures the shared default logger.

func ConfigureWithOptions

func ConfigureWithOptions(level string, format string, file string, fileOnly bool, prettyTimestamp bool) zap.Config

ConfigureWithOptions configures the shared default logger with options such as file and timestamp formats.

Types

type Config added in v1.36.1

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

Config for this package

type Option added in v1.36.1

type Option func(*Config)

Option for functional args

func OptionFile added in v1.36.1

func OptionFile(file string, fileOnly bool) Option

OptionFile configures file as logging destination

func OptionPrettyTimeStamp added in v1.36.1

func OptionPrettyTimeStamp() Option

OptionPrettyTimeStamp prettifies the timestamp

func OptionServiceName added in v1.36.1

func OptionServiceName(name string) Option

OptionServiceName configures a service name

Jump to

Keyboard shortcuts

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