Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Event ¶
Event is raised when something interesting happens in the application. Consists of a name an a map of key/value pairs.
type LogChans ¶
type LogChans struct { // CountChan increases the named Prometheus counter. CountChan chan Metric // GaugeChan increases the named Prometheus gauge. GaugeChan chan Metric // HistogramChan observes the named Prometheus histogram. HistogramChan chan Metric // ErrorChan sends the error to Application Insights. ErrorChan chan error // EventChan sends the event to Application Insights. EventChan chan Event // DebugChan prints a debug message to the console. DebugChan chan string }
LogChans a set of channels used for communicating events, metrics, errors and other telemetry types to the logger.
func Start ¶
Start starts the logger in a go routine and returns a set of channels that can be used to send telemetry to the logger.
func StartEmpty ¶ added in v0.0.7
StartEmpty starts a logger that doesn't log anything, but that will not block when log events are sent on the logging channels, the purpose being to provide support for testing scenarios when logging is not in focus.
type Option ¶ added in v0.0.9
type Option func(*OptionsCollector)
Option specifies options for configuring the logging.
func WithWriter ¶ added in v0.0.9
WithWriter lets clients set a writer which will receive logging events (in addition to the events being written to the standard destinations).
type Options ¶ added in v0.0.6
type Options struct { // SystemName the name of the containing system. SystemName string // AppName is the name of the running application/micro-service. AppName string // AppInsightsSecretPath the path to Application Insights instrumentation key in Vault. AppInsightsSecretPath string // SendMetricsToAppInsights indicates whether metrics should be sent to Application Insights // in addition to Prometheus. SendMetricsToAppInsights bool }
Options is used to configure the functionality of this entire module.
type OptionsCollector ¶ added in v0.0.9
type OptionsCollector struct {
// contains filtered or unexported fields
}
OptionsCollector collects all options before they are set.
type RequestHandler ¶ added in v0.0.8
RequestHandler the instance that is responsible for the business logic to be performed as a result of the incoming http request. Clients wishing t