logutils

package
v0.0.0-...-3b8f57b Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2015 License: GPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func File

func File() string

func NewLoggerHookSimple

func NewLoggerHookSimple(host, app string)

Types

type JSONFormatter

type JSONFormatter struct {
	Host string
	App  string
}

func (*JSONFormatter) Format

func (f *JSONFormatter) Format(entry *log.Entry) ([]byte, error)

type LoggerHook

type LoggerHook struct {
	HostPort string
	Conn     *websocket.Conn
	// contains filtered or unexported fields
}

func NewLoggerHook

func NewLoggerHook(hostport, host, app string) (*LoggerHook, error)

host is my host: what machine I am running on hostport is the address of the logging server host

func (*LoggerHook) Close

func (hook *LoggerHook) Close()

func (*LoggerHook) Connect

func (lh *LoggerHook) Connect()

func (*LoggerHook) Fire

func (hook *LoggerHook) Fire(entry *log.Entry) error

Fire is called when a log event is fired.

func (*LoggerHook) Levels

func (hook *LoggerHook) Levels() []log.Level

Levels returns the available logging levels.

Jump to

Keyboard shortcuts

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