Documentation
¶
Index ¶
- Variables
- func AttachLoggerToContext(ctx context.Context, logger *Logger) context.Context
- func Debug(args ...any)
- func Debugc(ctx context.Context, args ...any)
- func Debugf(format string, args ...any)
- func Debugfc(ctx context.Context, format string, args ...any)
- func Error(args ...any)
- func Errorc(ctx context.Context, args ...any)
- func Errorf(format string, args ...any)
- func Errorfc(ctx context.Context, format string, args ...any)
- func Fatal(args ...any)
- func Fatalc(ctx context.Context, args ...any)
- func Fatalf(format string, args ...any)
- func Fatalfc(ctx context.Context, format string, args ...any)
- func GetReqestID(w http.ResponseWriter, r *http.Request) string
- func Info(args ...any)
- func Infoc(ctx context.Context, args ...any)
- func Infof(format string, args ...any)
- func Infofc(ctx context.Context, format string, args ...any)
- func Panic(args ...any)
- func Panicc(ctx context.Context, args ...any)
- func Panicf(format string, args ...any)
- func Panicfc(ctx context.Context, format string, args ...any)
- func Print(args ...any)
- func Printc(ctx context.Context, args ...any)
- func Printf(format string, args ...any)
- func Printfc(ctx context.Context, format string, args ...any)
- func SetLevel(l zapcore.Level)
- func SetOutput(w io.Writer)
- func Trace(args ...any)
- func Tracec(ctx context.Context, args ...any)
- func Tracef(format string, args ...any)
- func Tracefc(ctx context.Context, format string, args ...any)
- func UpdateContext(ctx context.Context, f func(logger *Logger) *Logger) context.Context
- func Warn(args ...any)
- func Warnc(ctx context.Context, args ...any)
- func Warnf(format string, args ...any)
- func Warnfc(ctx context.Context, format string, args ...any)
- func WithPrefixMessage(ctx context.Context, prefix string) context.Context
- type Echo
- func (l *Echo) AccessLogger() echo.MiddlewareFunc
- func (l *Echo) Debug(i ...interface{})
- func (l *Echo) Debugf(format string, args ...interface{})
- func (l *Echo) Debugj(j log.JSON)
- func (l *Echo) Error(i ...interface{})
- func (l *Echo) Errorf(format string, args ...interface{})
- func (l *Echo) Errorj(j log.JSON)
- func (l *Echo) Fatal(i ...interface{})
- func (l *Echo) Fatalf(format string, args ...interface{})
- func (l *Echo) Fatalj(j log.JSON)
- func (l *Echo) Info(i ...interface{})
- func (l *Echo) Infof(format string, args ...interface{})
- func (l *Echo) Infoj(j log.JSON)
- func (l *Echo) Level() log.Lvl
- func (l *Echo) Output() io.Writer
- func (l *Echo) Panic(i ...interface{})
- func (l *Echo) Panicf(format string, args ...interface{})
- func (l *Echo) Panicj(j log.JSON)
- func (l *Echo) Prefix() string
- func (l *Echo) Print(i ...interface{})
- func (l *Echo) Printf(format string, args ...interface{})
- func (l *Echo) Printj(j log.JSON)
- func (l *Echo) SetDynamicPrefix(prefix func() Format)
- func (l *Echo) SetDynamicSuffix(suffix func() Format)
- func (l *Echo) SetHeader(_ string)
- func (l *Echo) SetLevel(lvl log.Lvl)
- func (l *Echo) SetOutput(w io.Writer)
- func (l *Echo) SetPrefix(s string)
- func (l *Echo) Warn(i ...interface{})
- func (l *Echo) Warnf(format string, args ...interface{})
- func (l *Echo) Warnj(j log.JSON)
- type Format
- type Logger
- func (l *Logger) AddCallerSkip(skip int) *Logger
- func (l *Logger) AppendDynamicPrefix(prefix func() Format) *Logger
- func (l *Logger) AppendDynamicSuffix(suffix func() Format) *Logger
- func (l *Logger) AppendPrefixMessage(prefix string) *Logger
- func (l *Logger) AppendSuffixMessage(suffix string) *Logger
- func (l *Logger) ClearPrefix() *Logger
- func (l *Logger) Debug(args ...any)
- func (l *Logger) Debugf(format string, args ...any)
- func (l *Logger) Debugw(msg string, keyAndValues ...any)
- func (l *Logger) Error(args ...any)
- func (l *Logger) Errorf(format string, args ...any)
- func (l *Logger) Errorw(msg string, keyAndValues ...any)
- func (l *Logger) Fatal(args ...any)
- func (l *Logger) Fatalf(format string, args ...any)
- func (l *Logger) Fatalw(msg string, keyAndValues ...any)
- func (l *Logger) Info(args ...any)
- func (l *Logger) Infof(format string, args ...any)
- func (l *Logger) Infow(msg string, keyAndValues ...any)
- func (l *Logger) Level() zapcore.Level
- func (l *Logger) Panic(args ...any)
- func (l *Logger) Panicf(format string, args ...any)
- func (l *Logger) Panicw(msg string, keyAndValues ...any)
- func (l *Logger) Prefix() string
- func (l *Logger) Print(args ...any)
- func (l *Logger) Printf(format string, args ...any)
- func (l *Logger) Printw(msg string, keyAndValues ...any)
- func (l *Logger) SetDynamicPrefix(prefix func() Format) *Logger
- func (l *Logger) SetDynamicSuffix(suffix func() Format) *Logger
- func (l *Logger) SetLevel(lv zapcore.Level)
- func (l *Logger) SetOutput(w io.Writer) *Logger
- func (l *Logger) SetPrefix(prefix string) *Logger
- func (l *Logger) Warn(args ...any)
- func (l *Logger) Warnf(format string, args ...any)
- func (l *Logger) Warnw(msg string, keyAndValues ...any)
- func (l *Logger) WithCaller(enabled bool) *Logger
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultLevel = zap.DebugLevel DefaultOutput = os.Stdout )
View Source
var GCP = false
View Source
var GCPEnv = []string{
"CLOUD_RUN_JOB",
"K_SERVICE",
"GOOGLE_CLOUD_PROJECT",
"GCP",
}
Functions ¶
func AttachLoggerToContext ¶
func GetReqestID ¶
func GetReqestID(w http.ResponseWriter, r *http.Request) string
func UpdateContext ¶
Types ¶
type Echo ¶
type Echo struct {
// contains filtered or unexported fields
}
func NewEchoWith ¶
func NewEchoWithRaw ¶
func (*Echo) AccessLogger ¶
func (l *Echo) AccessLogger() echo.MiddlewareFunc
AccessLogger is a function to get a middleware to log accesses
func (*Echo) SetDynamicPrefix ¶
func (*Echo) SetDynamicSuffix ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func GetLoggerFromContext ¶
func NewWithOutput ¶
func (*Logger) AddCallerSkip ¶
func (*Logger) AppendDynamicPrefix ¶
func (*Logger) AppendDynamicSuffix ¶
func (*Logger) AppendPrefixMessage ¶
func (*Logger) AppendSuffixMessage ¶
func (*Logger) ClearPrefix ¶
func (*Logger) SetDynamicPrefix ¶
func (*Logger) SetDynamicSuffix ¶
func (*Logger) WithCaller ¶
Click to show internal directories.
Click to hide internal directories.