lelogger

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Creator

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

Creator creates new logetries clients

func NewCreator

func NewCreator(token string) *Creator

NewCreator returns a logger creator that will use the provided token to create a new le driver for each single logger

func NewCreatorWithDriver

func NewCreatorWithDriver(driver *le_go.Logger) *Creator

NewCreatorWithDriver returns a logger creator that will always use the provider driver

func NewSharedCreator

func NewSharedCreator(token string) (*Creator, error)

NewSharedCreator returns a logger creator that will use the provided token to create a new le driver, and will reuse this driver for all logger created

func (*Creator) New

func (c *Creator) New() (logger.Logger, error)

New returns a new le client

type Logger

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

Logger represents a logger that sends data to logentries

func New

func New(token string) (*Logger, error)

New creates a new logger using a new tcp connection

func NewWithDriver

func NewWithDriver(driver *le_go.Logger) *Logger

NewWithDriver creates a new logger using an existing driver, the driver will not be closed when Close() is called

func (*Logger) AddStaticData

func (le *Logger) AddStaticData(msg string, args ...interface{})

AddStaticData is used to add static data to the logs. static data will be added to all logs

func (*Logger) Close

func (le *Logger) Close() error

Close closes the connection to logentries

func (*Logger) Error

func (le *Logger) Error(msg string)

Error is used to log an error

func (*Logger) Errorf

func (le *Logger) Errorf(msg string, args ...interface{})

Errorf is used to log an error with formating

func (*Logger) Send

func (le *Logger) Send(msg string)

Send is used to log a raw message

Jump to

Keyboard shortcuts

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