logging

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetServiceName

func SetServiceName(name string)

SetServiceName configures the service name to log with each LogEntry.

Types

type LogEntry

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

LogEntry is a wrapper around a logrus entry

func NewLogEntry

func NewLogEntry() *LogEntry

NewLogEntry creates a new logrus Entry

func (*LogEntry) Debug

func (l *LogEntry) Debug(args ...interface{})

Debug wraps the logrus Debug function

func (*LogEntry) Error

func (l *LogEntry) Error(err interface{}, args ...interface{})

Error wraps the logrus Error function

func (*LogEntry) Fatal

func (l *LogEntry) Fatal(args ...interface{})

Fatal wraps the logrus Fatal function

func (*LogEntry) Fields

func (l *LogEntry) Fields() map[string]interface{}

Fields returns all the fields that are in the logs

func (*LogEntry) Info

func (l *LogEntry) Info(args ...interface{})

Info wraps the logrus Info function

func (*LogEntry) Panic

func (l *LogEntry) Panic(args ...interface{})

Panic wraps the logrus Panic function

func (*LogEntry) Printf

func (l *LogEntry) Printf(format string, args ...interface{})

Printf wraps the logrus Printf function

func (*LogEntry) Warn

func (l *LogEntry) Warn(args ...interface{})

Warn wraps the logrus Warn function

func (*LogEntry) WithAction

func (l *LogEntry) WithAction(action string) *LogEntry

WithAction appends an `action` tag to a LogEntry indicating the URL action triggered.

func (*LogEntry) WithAllowedGroups

func (l *LogEntry) WithAllowedGroups(groups []string) *LogEntry

WithAllowedGroups appends an `allowed_groups` tag to a LogEntry.

func (*LogEntry) WithBackoffDuration

func (l *LogEntry) WithBackoffDuration(resetDuration time.Duration) *LogEntry

WithBackoffDuration appends a `backoff_duration` tag to a LogEntry.

func (*LogEntry) WithBackoffReset

func (l *LogEntry) WithBackoffReset(resetTime time.Time) *LogEntry

WithBackoffReset appends a `backoff_reset` tag to a LogEntry.

func (*LogEntry) WithCircuitChangeFrom

func (l *LogEntry) WithCircuitChangeFrom(from interface{}) *LogEntry

WithCircuitChangeFrom appends a `circuit_change_from` tag to a LogEntry.

func (*LogEntry) WithCircuitChangeTo

func (l *LogEntry) WithCircuitChangeTo(to interface{}) *LogEntry

WithCircuitChangeTo appends a `circuit_change_to` tag to a LogEntry.

func (*LogEntry) WithClientID

func (l *LogEntry) WithClientID(clientID string) *LogEntry

WithClientID appends a `client_id` tag to a LogEntry.

func (*LogEntry) WithCookieDomain

func (l *LogEntry) WithCookieDomain(domain string) *LogEntry

WithCookieDomain appends a `cookie_domain` tag to a LogEntry.

func (*LogEntry) WithCookieExpire

func (l *LogEntry) WithCookieExpire(expiration time.Duration) *LogEntry

WithCookieExpire appends a `cookie_expire` tag to a LogEntry.

func (*LogEntry) WithCookieHTTPOnly

func (l *LogEntry) WithCookieHTTPOnly(httpOnly bool) *LogEntry

WithCookieHTTPOnly appends a `cookie_http_only` tag to a LogEntry.

func (*LogEntry) WithCookieName

func (l *LogEntry) WithCookieName(name string) *LogEntry

WithCookieName appends a `cookie_name` tag to a LogEntry.

func (*LogEntry) WithCookieRefresh

func (l *LogEntry) WithCookieRefresh(refresh time.Duration) *LogEntry

WithCookieRefresh appends a `cookie_refresh` tag to a LogEntry.

func (*LogEntry) WithCookieSecure

func (l *LogEntry) WithCookieSecure(isSecure bool) *LogEntry

WithCookieSecure appends a `cookie_secure` tag to a LogEntry.

func (*LogEntry) WithEndpoint

func (l *LogEntry) WithEndpoint(endpoint string) *LogEntry

WithEndpoint appends an `endpoint` tag to a LogEntry.

func (*LogEntry) WithError

func (l *LogEntry) WithError(err error) *LogEntry

WithError appends an `error` tag to a LogEntry. Useful for annotating non-Error log entries (e.g. Fatal messages) with an `error` object.

func (*LogEntry) WithHTTPStatus

func (l *LogEntry) WithHTTPStatus(status int) *LogEntry

WithHTTPStatus appends an `http_status` tag to a LogEntry.

func (*LogEntry) WithInGroups

func (l *LogEntry) WithInGroups(groups []string) *LogEntry

WithInGroups appends an `in_groups` tag to a LogEntry.

func (*LogEntry) WithLifetimeDeadline

func (l *LogEntry) WithLifetimeDeadline(valid time.Time) *LogEntry

WithLifetimeDeadline appends a `lifetime_deadline` tag to a LogEntry.

func (*LogEntry) WithNumCookieBytes

func (l *LogEntry) WithNumCookieBytes(sz int) *LogEntry

WithNumCookieBytes appends a `num_cookie_bytes` tag to a LogEntry.

func (*LogEntry) WithPageMessage

func (l *LogEntry) WithPageMessage(msg string) *LogEntry

WithPageMessage appends a `page_message` tag to a LogEntry.

func (*LogEntry) WithPageTitle

func (l *LogEntry) WithPageTitle(title string) *LogEntry

WithPageTitle appends a `page_title` tag to a LogEntry.

func (*LogEntry) WithProvider

func (l *LogEntry) WithProvider(provider string) *LogEntry

WithProvider appends a `provider` tag to a LogEntry.

func (*LogEntry) WithProxyHost

func (l *LogEntry) WithProxyHost(host string) *LogEntry

WithProxyHost appends a `proxy_host` tag to a LogEntry.

func (*LogEntry) WithRedeemURL

func (l *LogEntry) WithRedeemURL(url string) *LogEntry

WithRedeemURL appends a `redeem_url` tag to a LogEntry.

func (*LogEntry) WithRefreshDeadline

func (l *LogEntry) WithRefreshDeadline(refresh time.Time) *LogEntry

WithRefreshDeadline appends a `refresh_deadline` tag to a LogEntry.

func (*LogEntry) WithRemoteAddress

func (l *LogEntry) WithRemoteAddress(address string) *LogEntry

WithRemoteAddress appends a `remote_address` tag to a LogEntry.

func (*LogEntry) WithRequestDurationMs

func (l *LogEntry) WithRequestDurationMs(duration float64) *LogEntry

WithRequestDurationMs appends a `request_duration` tag to a LogEntry.

func (*LogEntry) WithRequestHost

func (l *LogEntry) WithRequestHost(host string) *LogEntry

WithRequestHost appends a `request_host` tag to a LogEntry.

func (*LogEntry) WithRequestMethod

func (l *LogEntry) WithRequestMethod(method string) *LogEntry

WithRequestMethod appends a `request_method` tag to a LogEntry.

func (*LogEntry) WithRequestURI

func (l *LogEntry) WithRequestURI(uri string) *LogEntry

WithRequestURI appends a `request_uri` tag to a LogEntry.

func (*LogEntry) WithResponseBody

func (l *LogEntry) WithResponseBody(body []byte) *LogEntry

WithResponseBody appends a `response_body` tag to a LogEntry.

func (*LogEntry) WithRewriteRoute

func (l *LogEntry) WithRewriteRoute(route interface{}) *LogEntry

WithRewriteRoute appends a `rewrite_route` tag to a LogEntry.

func (*LogEntry) WithSessionValid

func (l *LogEntry) WithSessionValid(valid time.Time) *LogEntry

WithSessionValid appends a `session_valid` tag to a LogEntry.

func (*LogEntry) WithSignInURL

func (l *LogEntry) WithSignInURL(url *url.URL) *LogEntry

WithSignInURL appends a `sign_in_url` tag to a LogEntry.

func (*LogEntry) WithStatsdHost

func (l *LogEntry) WithStatsdHost(host string) *LogEntry

WithStatsdHost appends a `statsd_host` tag to a LogEntry.

func (*LogEntry) WithStatsdPort

func (l *LogEntry) WithStatsdPort(port int) *LogEntry

WithStatsdPort appends a `statsd_port` tag to a LogEntry.

func (*LogEntry) WithURLParam

func (l *LogEntry) WithURLParam(param string) *LogEntry

WithURLParam appends a `url_param` tag to a LogEntry.

func (*LogEntry) WithUser

func (l *LogEntry) WithUser(user string) *LogEntry

WithUser appends a `user` tag to a LogEntry.

func (*LogEntry) WithUserAgent

func (l *LogEntry) WithUserAgent(agent string) *LogEntry

WithUserAgent appends a `user_agent` tag to a LogEntry.

func (*LogEntry) WithUserGroup

func (l *LogEntry) WithUserGroup(group string) *LogEntry

WithUserGroup appends a `user_group` tag to a LogEntry.

Jump to

Keyboard shortcuts

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