Documentation ¶
Index ¶
- func Any(key string, value interface{}) zap.Field
- func Error(err error) zap.Field
- func Int64(key string, val int64) zap.Field
- func IsTerminal(w io.Writer) bool
- func New() *zap.Logger
- func Stack() zap.Field
- func String(key string, val string) zap.Field
- func Uint16(key string, val uint16) zap.Field
- func Uint32(key string, val uint32) zap.Field
- type Config
- type Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Any ¶
Any takes a key and an arbitrary value and chooses the best way to represent them as a field, falling back to a reflection-based approach only if necessary.
func IsTerminal ¶
IsTerminal checks if w is a file and whether it is an interactive terminal session.
func Stack ¶
Stack constructs a field that stores a stacktrace of the current goroutine under provided key. Keep in mind that taking a stacktrace is eager and expensive (relatively speaking); this function both makes an allocation and takes about two microseconds.
Types ¶
type Config ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger is wrapper for zap logger with module, it is singleton.
func (*Logger) Debug ¶
Debug logs a message at DebugLevel. The message includes any fields passed at the log site, as well as any fields accumulated on the logger.
func (*Logger) Error ¶
Error logs a message at ErrorLevel. The message includes any fields passed at the log site, as well as any fields accumulated on the logger.