logging

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2018 License: BSD-2-Clause Imports: 5 Imported by: 2

README

gizmo-stackdriver-logging

Build Status

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Level string `envconfig:"LOGGING_LEVEL" default:"info"`

	// List of environment variables that should be included in all log
	// lines.
	EnvironmentVariables []string `envconfig:"LOGGING_ENVIRONMENT_VARIABLES"`

	// Send logs to StackDriver?
	SendToStackDriver bool `envconfig:"LOGGING_SEND_TO_STACKDRIVER"`

	// StackDriver error reporting options. When present, error logs are
	// going to be reported as errors on StackDriver.
	StackDriverErrorServiceName string `envconfig:"LOGGING_STACKDRIVER_ERROR_SERVICE_NAME"`
	StackDriverErrorLogName     string `envconfig:"LOGGING_STACKDRIVER_ERROR_LOG_NAME" default:"error_log"`
}

Config contains configuration for logging level and services integration.

func (*Config) Logger

func (c *Config) Logger() (*logrus.Logger, error)

Logger returns a logrus logger with the features defined in the config.

Jump to

Keyboard shortcuts

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