logger

package module
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2022 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ILogger

type ILogger interface {
	Debug(mgs string)
	Info(mgs string)
	Warn(mgs string)
	Error(mgs string)
	Fatal(mgs string)
	Panic(mgs string)

	Debugf(format string, args ...interface{})
	Infof(format string, args ...interface{})
	Warnf(format string, args ...interface{})
	Errorf(format string, args ...interface{})
	Fatalf(format string, args ...interface{})
	Panicf(format string, args ...interface{})

	Debugw(mgs string, keysAndValues ...interface{})
	Infow(mgs string, keysAndValues ...interface{})
	Warnw(mgs string, keysAndValues ...interface{})
	Errorw(mgs string, keysAndValues ...interface{})
	Fatalw(mgs string, keysAndValues ...interface{})
	Panicw(mgs string, keysAndValues ...interface{})
}

ILogger interface

type Logger

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

func Init

func Init(service string, evn string) (*Logger, error)

Init logger

func (Logger) Debug

func (l Logger) Debug(mgs string)

Debug - implement from Ilogger

func (Logger) Debugf

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

Debugf - implement from Ilogger

func (Logger) Debugw

func (l Logger) Debugw(mgs string, keysAndValues ...interface{})

Debugw - implement from Ilogger

func (Logger) EchoLogger

func (logger Logger) EchoLogger() echo.MiddlewareFunc

EchoLogger returns a middleware that logs HTTP requests.

func (Logger) EchoRecover

func (logger Logger) EchoRecover() echo.MiddlewareFunc

EchoRecover returns a middleware which recovers from panics anywhere in the chain and handles the control to the centralized HTTPErrorHandler.

func (Logger) Error

func (l Logger) Error(mgs string)

Error - implement from Ilogger

func (Logger) Errorf

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

Errorf - implement from Ilogger

func (Logger) Errorw

func (l Logger) Errorw(mgs string, keysAndValues ...interface{})

Errorw - implement from Ilogger

func (Logger) Fatal

func (l Logger) Fatal(mgs string)

Fatal - implement from Ilogger

func (Logger) Fatalf

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

Fatalf - implement from Ilogger

func (Logger) Fatalw

func (l Logger) Fatalw(mgs string, keysAndValues ...interface{})

Fatalw - implement from Ilogger

func (Logger) GetEchoLogFormat

func (l Logger) GetEchoLogFormat() string

GetEchoLogFormat - get echo log format

func (Logger) Info

func (l Logger) Info(mgs string)

Info - implement from Ilogger

func (Logger) Infof

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

Infof - implement from Ilogger

func (Logger) Infow

func (l Logger) Infow(mgs string, keysAndValues ...interface{})

Infow - implement from Ilogger

func (Logger) Panic

func (l Logger) Panic(mgs string)

Panic - implement from Ilogger

func (Logger) Panicf

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

Panicf - implement from Ilogger

func (Logger) Panicw

func (l Logger) Panicw(mgs string, keysAndValues ...interface{})

Panicw - implement from Ilogger

func (Logger) RecoverWithConfig

func (logger Logger) RecoverWithConfig(config middleware.RecoverConfig) echo.MiddlewareFunc

RecoverWithConfig returns a Recover middleware with config. See: `Recover()`.

func (Logger) Sync

func (l Logger) Sync() error

Sync calls the underlying Core's Sync method, flushing any buffered log entries. Applications should take care to call Sync before exiting.

func (Logger) Warn

func (l Logger) Warn(mgs string)

Warn - implement from Ilogger

func (Logger) Warnf

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

Warnf - implement from Ilogger

func (Logger) Warnw

func (l Logger) Warnw(mgs string, keysAndValues ...interface{})

Warnw - implement from Ilogger

func (Logger) With

func (l Logger) With(fields ...zap.Field) Logger

With - with

type LoggerConfig

type LoggerConfig struct {
	// Skipper defines a function to skip middleware.
	Skipper middleware.Skipper
	// contains filtered or unexported fields
}

LoggerConfig defines the config for Logger middleware.

type MockedLoggerImpl

type MockedLoggerImpl struct {
}

MockedLoggerImpl - mock for logger

func (MockedLoggerImpl) Debug

func (l MockedLoggerImpl) Debug(mgs string)

Debug - implement from Ilogger

func (MockedLoggerImpl) Debugf

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

Debugf - implement from Ilogger

func (MockedLoggerImpl) Debugw

func (l MockedLoggerImpl) Debugw(mgs string, keysAndValues ...interface{})

Debugw - implement from Ilogger

func (MockedLoggerImpl) Error

func (l MockedLoggerImpl) Error(mgs string)

Error - implement from Ilogger

func (MockedLoggerImpl) Errorf

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

Errorf - implement from Ilogger

func (MockedLoggerImpl) Errorw

func (l MockedLoggerImpl) Errorw(mgs string, keysAndValues ...interface{})

Errorw - implement from Ilogger

func (MockedLoggerImpl) Fatal

func (l MockedLoggerImpl) Fatal(mgs string)

Fatal - implement from Ilogger

func (MockedLoggerImpl) Fatalf

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

Fatalf - implement from Ilogger

func (MockedLoggerImpl) Fatalw

func (l MockedLoggerImpl) Fatalw(mgs string, keysAndValues ...interface{})

Fatalw - implement from Ilogger

func (MockedLoggerImpl) Info

func (l MockedLoggerImpl) Info(mgs string)

Info - implement from Ilogger

func (MockedLoggerImpl) Infof

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

Infof - implement from Ilogger

func (MockedLoggerImpl) Infow

func (l MockedLoggerImpl) Infow(mgs string, keysAndValues ...interface{})

Infow - implement from Ilogger

func (MockedLoggerImpl) Panic

func (l MockedLoggerImpl) Panic(mgs string)

Panic - implement from Ilogger

func (MockedLoggerImpl) Panicf

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

Panicf - implement from Ilogger

func (MockedLoggerImpl) Panicw

func (l MockedLoggerImpl) Panicw(mgs string, keysAndValues ...interface{})

Panicw - implement from Ilogger

func (MockedLoggerImpl) Warn

func (l MockedLoggerImpl) Warn(mgs string)

Warn - implement from Ilogger

func (MockedLoggerImpl) Warnf

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

Warnf - implement from Ilogger

func (MockedLoggerImpl) Warnw

func (l MockedLoggerImpl) Warnw(mgs string, keysAndValues ...interface{})

Warnw - implement from Ilogger

Jump to

Keyboard shortcuts

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