logging

package
v0.0.0-...-45b9289 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2016 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package logging is the logging package used by Neptune.io agent. The implementation might route the logging via any other Go logging package but should mask those details from remaining agent packages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(msg string, fields Fields)

func Error

func Error(msg string, fields Fields)

func Info

func Info(msg string, fields Fields)

func SetupLogger

func SetupLogger(logfile string, debugMode bool, errorsChannel chan string) error

Function to setup logger for agent.

func Warn

func Warn(msg string, fields Fields)

Types

type Fields

type Fields map[string]interface{}

Fields type, used to pass to key value pairs.

type NeptuneHook

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

NeptuneHook to send logs to Neptune service.

func NewNeptuneHook

func NewNeptuneHook(level logrus.Level, ch chan string) *NeptuneHook

NewNeptuneHook creates a hook to be added to an instance of logger.

func (*NeptuneHook) Fire

func (hook *NeptuneHook) Fire(entry *logrus.Entry) error

Fire sends the event to Neptune

func (*NeptuneHook) Levels

func (hook *NeptuneHook) Levels() []logrus.Level

Levels returns the list of logging levels that we want to send to Neptune.

Jump to

Keyboard shortcuts

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