Documentation
¶
Index ¶
- func Configure(opts ...Option)
- func DPanic(v ...interface{})
- func DPanicf(template string, v ...interface{})
- func Debug(v ...interface{})
- func DebugIfError(err error)
- func Debugf(template string, v ...interface{})
- func Error(v ...interface{})
- func Errorf(template string, v ...interface{})
- func Fatal(v ...interface{})
- func FatalIfError(err error)
- func FatalIfErrorSecondArg(input interface{}, err error) interface{}
- func Fatalf(template string, v ...interface{})
- func Info(v ...interface{})
- func InfoIfError(err error)
- func Infof(template string, v ...interface{})
- func L() *zap.Logger
- func LogByteArrayLineByLine(in []byte, f func(string, ...interface{}), prefix ...string)
- func LogByteArrayLineByLineToDebug(in []byte, prefix ...string)
- func LogByteArrayLineByLineToError(in []byte, prefix ...string)
- func LogByteArrayLineByLineToInfo(in []byte, prefix ...string)
- func LogByteArrayLineByLineToWarn(in []byte, prefix ...string)
- func LogEnvStruct(envStruct interface{}, prefix string)
- func LogIfError(err error)
- func LogIfErrorSecondArg(input interface{}, err error) interface{}
- func LogIfErrorToInfo(err error)
- func LogIfErrorToInfoSecondArg(_ interface{}, err error)
- func LogJSONStruct(envStruct interface{}, prefix string)
- func Panic(v ...interface{})
- func PanicIfError(err error)
- func PanicIfErrorSecondArg(input interface{}, err error) interface{}
- func Panicf(template string, v ...interface{})
- func S() *zap.SugaredLogger
- func Trace(v ...interface{})
- func TraceIfError(err error)
- func Tracef(template string, v ...interface{})
- func Warn(v ...interface{})
- func WarnIfError(err error)
- func Warnf(template string, v ...interface{})
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FatalIfErrorSecondArg ¶
func FatalIfErrorSecondArg(input interface{}, err error) interface{}
Logs if error received as second argument to FATAL-level (and panicking after) is not nil (first argument is discarded)
func LogByteArrayLineByLine ¶
Logs a byteArray line by line
func LogByteArrayLineByLineToDebug ¶
Logs a byteArray line by line to Debug
func LogByteArrayLineByLineToError ¶
Logs a byteArray line by line to Error
func LogByteArrayLineByLineToInfo ¶
Logs a byteArray line by line to Info
func LogByteArrayLineByLineToWarn ¶
Logs a byteArray line by line to Warn
func LogEnvStruct ¶
func LogEnvStruct(envStruct interface{}, prefix string)
Helper function to log out a struct annotated with "env", "mask" and "warnIf" annotations Good to use with the "github.com/codingconcepts/env" package
func LogIfErrorSecondArg ¶
func LogIfErrorSecondArg(input interface{}, err error) interface{}
Logs if error received as second argument to ERROR-level is not nil (first argument is discarded)
func LogIfErrorToInfo ¶
func LogIfErrorToInfo(err error)
Logs the error to INFO-level if it is not nil
func LogIfErrorToInfoSecondArg ¶
func LogIfErrorToInfoSecondArg(_ interface{}, err error)
Logs if error received as second argument to INFO-level is not nil (first argument is discarded)
func LogJSONStruct ¶
func LogJSONStruct(envStruct interface{}, prefix string)
Helper function to log out a struct annotated with "json", "mask" and "warnIf" annotations Good to use with the "encoding/json" package
func PanicIfError ¶
func PanicIfError(err error)
Logs the error to PANIC-level (and panicking after) if is not nil
func PanicIfErrorSecondArg ¶
func PanicIfErrorSecondArg(input interface{}, err error) interface{}
Logs if error received as second argument to PANIC-level (and panicking after) is not nil (first argument is discarded)
func S ¶
func S() *zap.SugaredLogger
Types ¶
type Option ¶
type Option interface {
// contains filtered or unexported methods
}