ael

package module
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2020 License: MIT Imports: 12 Imported by: 0

README

ael

Package that implements Echo Logger interface using Cloud Logging.
It is intended for use with App Engine Second generation.

License

MIT

Author

Masahiro Furudate (a.k.a. 178inaba)
178inaba.git@gmail.com

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLogger added in v1.2.0

func GetLogger(ctx context.Context) echo.Logger

GetLogger retrieves the logger from the context. Use `github.com/labstack/gommon/log` if there is no logger in the context.

Types

type Logger

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

Logger is echo logger using cloud logging.

func NewLogger

func NewLogger(logger *logging.Logger, trace, spanID string) *Logger

NewLogger returns echo logger using cloud logging.

func (*Logger) Debug

func (l *Logger) Debug(i ...interface{})

Debug prints i to log level debug.

func (*Logger) Debugf

func (l *Logger) Debugf(format string, args ...interface{})

Debugf prints format string to log level debug.

func (*Logger) Debugj

func (l *Logger) Debugj(j log.JSON)

Debugj prints j to log level debug.

func (*Logger) Error

func (l *Logger) Error(i ...interface{})

Error prints i to log level error.

func (*Logger) Errorf

func (l *Logger) Errorf(format string, args ...interface{})

Errorf prints format string to log level error.

func (*Logger) Errorj

func (l *Logger) Errorj(j log.JSON)

Errorj prints j to log level error.

func (*Logger) Fatal

func (l *Logger) Fatal(i ...interface{})

Fatal prints i and exit 1.

func (*Logger) Fatalf

func (l *Logger) Fatalf(format string, args ...interface{})

Fatalf prints format string and exit 1.

func (*Logger) Fatalj

func (l *Logger) Fatalj(j log.JSON)

Fatalj prints j and exit 1.

func (*Logger) Info

func (l *Logger) Info(i ...interface{})

Info prints i to log level info.

func (*Logger) Infof

func (l *Logger) Infof(format string, args ...interface{})

Infof prints format string to log level info.

func (*Logger) Infoj

func (l *Logger) Infoj(j log.JSON)

Infoj prints j to log level info.

func (*Logger) Level

func (l *Logger) Level() log.Lvl

Level returns print log level.

func (*Logger) Output

func (l *Logger) Output() io.Writer

Output does nothing.

func (*Logger) Panic

func (l *Logger) Panic(i ...interface{})

Panic prints i and panic.

func (*Logger) Panicf

func (l *Logger) Panicf(format string, args ...interface{})

Panicf prints format string and panic.

func (*Logger) Panicj

func (l *Logger) Panicj(j log.JSON)

Panicj prints j and panic.

func (*Logger) Prefix

func (l *Logger) Prefix() string

Prefix does nothing.

func (*Logger) Print

func (l *Logger) Print(i ...interface{})

Print prints i.

func (*Logger) Printf

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

Printf prints format string.

func (*Logger) Printj

func (l *Logger) Printj(j log.JSON)

Printj prints j.

func (*Logger) SetHeader

func (l *Logger) SetHeader(h string)

SetHeader does nothing.

func (*Logger) SetLevel

func (l *Logger) SetLevel(v log.Lvl)

SetLevel sets print log level.

func (*Logger) SetOutput

func (l *Logger) SetOutput(w io.Writer)

SetOutput does nothing.

func (*Logger) SetPrefix

func (l *Logger) SetPrefix(p string)

SetPrefix does nothing.

func (*Logger) Warn

func (l *Logger) Warn(i ...interface{})

Warn prints i to log level warning.

func (*Logger) Warnf

func (l *Logger) Warnf(format string, args ...interface{})

Warnf prints format string to log level warning.

func (*Logger) Warnj

func (l *Logger) Warnj(j log.JSON)

Warnj prints j to log level warning.

type LoggerMiddleware

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

LoggerMiddleware is appengine echo logger middleware.

func NewLoggerMiddleware

func NewLoggerMiddleware(client *logging.Client, moduleID, projectID, versionID, zone string) *LoggerMiddleware

NewLoggerMiddleware returns appengine echo logger middleware.

func (*LoggerMiddleware) Logger

func (m *LoggerMiddleware) Logger(next echo.HandlerFunc) echo.HandlerFunc

Logger is appengine echo logger middleware. Set application logger to echo.Context and write request log.

Jump to

Keyboard shortcuts

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