log

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package log implements github.com/sirupsen/logrus to provide logging functionality.

Index

Constants

View Source
const (

	// FuncField is the name of the log field denoting the name of the function doing the logging.
	FuncField = "func"

	// PortField is the name of the log field denoting a server port number.
	PortField = "port"

	// MethodField is the name of the log field denoting the HTTP method name.
	MethodField = "method"

	// PathField is the name of the log field denoting an HTTP path.
	PathField = "path"

	// UseTLSField is the name of the log field denoting whether a server is configured to use TLS.
	UseTLSField = "useTLS"

	// CertFileField is the name of the log field denoting the configured path to a server's TLS certificate.
	CertFileField = "certFile"

	// KeyFileField is the name of the log field denoting the configured path to a server's TLS key.
	KeyFileField = "keyFile"

	// DefaultCertFileField is the name of the log field denoting the default cert file.
	DefaultCertFileField = "defaultCertFile"

	// DefaultKeyFileField is the name of the log field denoting the default key file.
	DefaultKeyFileField = "defaultKeyFile"

	// BaseURLField is the name of the log field denoting the base URL of an API.
	BaseURLField = "baseURL"

	// RouteField is the name of the log field denoting a registered route in an API.
	RouteField = "route"

	// FileField is the name of the log field denoting a file that a mock API route will serve.
	FileField = "file"

	// APIDirField is the name of the log field denoting the directory a mock API is in.
	APIDirField = "apiDir"

	// APINameField is the name of the log field denoting the name of a mock API.
	APINameField = "mockAPIName"

	// EndpointNameField is the name of the log field denoting the name of an endpoint.
	EndpointNameField = "endpointName"

	// ResponseHeadersField is the name of the log field denoting the response headers.
	ResponseHeadersField = "responseHeaders"
)

Variables

This section is empty.

Functions

func GetFakeLogger

func GetFakeLogger() *logrus.Entry

GetFakeLogger returns a fake logger that logs nothing.

func NewLogger

func NewLogger(config *config.Log, pkgName string) *logrus.Entry

NewLogger returns a new instance of a logger.

Types

This section is empty.

Jump to

Keyboard shortcuts

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