Back to godoc.org

Package logger

v0.0.0-...-b2c9b18
Latest Go to latest

The latest major version is .

Published: May 10, 2019 | License: MIT | Module: github.com/corvinusz/echo-xorm

Index

func HTTPLogger

func HTTPLogger(l Logger) echo.MiddlewareFunc

HTTPLogger returns a middleware that logs HTTP requests.

type Logger

type Logger interface {
	Info(values ...interface{})  // used to log "info" messages
	Error(values ...interface{}) // used to log "error" messages
	Warn(values ...interface{})  // used to log "warning" messages
	Close()
}

Logger is an interface for logging

type NilLogger

type NilLogger struct {
}

NilLogger logs nothing

func NewNilLogger

func NewNilLogger() *NilLogger

NewNilLogger is a constructor

func (*NilLogger) Close

func (l *NilLogger) Close()

Close for NilLogger do nothing

func (*NilLogger) Error

func (l *NilLogger) Error(values ...interface{})

Error do nothing, just match the interface

func (*NilLogger) Info

func (l *NilLogger) Info(values ...interface{})

Info do nothing, just match the interface

func (*NilLogger) Warn

func (l *NilLogger) Warn(values ...interface{})

Warn do nothing, just match the interface

type OrmLogger

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

OrmLogger is implementation of xorm core.ILogger with proxy logger

func NewOrmLogger

func NewOrmLogger(proxyLogger Logger) *OrmLogger

NewOrmLogger is logger constructor

func (*OrmLogger) Debug

func (l *OrmLogger) Debug(v ...interface{})

Debug implement core.ILogger

func (*OrmLogger) Debugf

func (l *OrmLogger) Debugf(format string, v ...interface{})

Debugf implement core.ILogger

func (*OrmLogger) Error

func (l *OrmLogger) Error(v ...interface{})

Error implement core.ILogger

func (*OrmLogger) Errorf

func (l *OrmLogger) Errorf(format string, v ...interface{})

Errorf implement core.ILogger

func (*OrmLogger) Info

func (l *OrmLogger) Info(v ...interface{})

Info implement core.ILogger

func (*OrmLogger) Infof

func (l *OrmLogger) Infof(format string, v ...interface{})

Infof implement core.ILogger

func (*OrmLogger) IsShowSQL

func (l *OrmLogger) IsShowSQL() bool

IsShowSQL implement core.ILogger

func (*OrmLogger) Level

func (l *OrmLogger) Level() core.LogLevel

Level implement core.ILogger

func (*OrmLogger) SetLevel

func (l *OrmLogger) SetLevel(core.LogLevel)

SetLevel implement core.ILogger

func (*OrmLogger) ShowSQL

func (l *OrmLogger) ShowSQL(...bool)

ShowSQL implement core.ILogger

func (*OrmLogger) Warn

func (l *OrmLogger) Warn(v ...interface{})

Warn implement core.ILogger

func (*OrmLogger) Warnf

func (l *OrmLogger) Warnf(format string, v ...interface{})

Warnf implement core.ILogger

type StdLogger

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

StdLogger logs to Stdout

func NewStdLogger

func NewStdLogger(id, tag string) *StdLogger

NewStdLogger is StdLogger constructor

func (*StdLogger) Close

func (l *StdLogger) Close()

Close for Stdlogger does nothing

func (*StdLogger) Error

func (l *StdLogger) Error(values ...interface{})

Error logs "error" messages. First value should be Event string

func (*StdLogger) Info

func (l *StdLogger) Info(values ...interface{})

Info logs "info" messages. First value should be Event string

func (*StdLogger) Warn

func (l *StdLogger) Warn(values ...interface{})

Warn logs "warning" messages. First value should be Event string

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier