Documentation
¶
Index ¶
- Variables
- func AtLevel(level, msg string, fields ...zapcore.Field)
- func Debug(msg string, keysAndValues ...interface{})
- func Debugf(template string, args ...interface{})
- func Debugs(args ...interface{})
- func Debugt(msg string, fields ...zapcore.Field)
- func Debugw(msg string, keysAndValues ...interface{})
- func Error(msg string, keysAndValues ...interface{})
- func Errorf(template string, args ...interface{})
- func Errors(args ...interface{})
- func Errort(msg string, fields ...zapcore.Field)
- func Errorw(msg string, keysAndValues ...interface{})
- func Fatal(msg string, keysAndValues ...interface{})
- func Fatalf(template string, args ...interface{})
- func Fatals(args ...interface{})
- func Fatalt(msg string, fields ...zapcore.Field)
- func Fatalw(msg string, keysAndValues ...interface{})
- func ForwardLogs(logPipe io.ReadCloser) chan error
- func Info(msg string, keysAndValues ...interface{})
- func Infof(template string, args ...interface{})
- func Infos(args ...interface{})
- func Infot(msg string, fields ...zapcore.Field)
- func Infow(msg string, keysAndValues ...interface{})
- func Panic(msg string, keysAndValues ...interface{})
- func Panicf(template string, args ...interface{})
- func Panics(args ...interface{})
- func Panict(msg string, fields ...zapcore.Field)
- func Panicw(msg string, keysAndValues ...interface{})
- func Warn(msg string, keysAndValues ...interface{})
- func Warnf(template string, args ...interface{})
- func Warns(args ...interface{})
- func Warnt(msg string, fields ...zapcore.Field)
- func Warnw(msg string, keysAndValues ...interface{})
- type Config
- type Logger
- func (logger *Logger) Debug(msg string, keyValues ...interface{})
- func (logger *Logger) Debugs(args ...interface{})
- func (logger *Logger) Debugt(msg string, fields ...zapcore.Field)
- func (logger *Logger) Error(msg string, keyValues ...interface{})
- func (logger *Logger) Errors(args ...interface{})
- func (logger *Logger) Errort(msg string, fields ...zapcore.Field)
- func (logger *Logger) Fatal(msg string, keyValues ...interface{})
- func (logger *Logger) Fatals(args ...interface{})
- func (logger *Logger) Fatalt(msg string, fields ...zapcore.Field)
- func (logger *Logger) Info(msg string, keyValues ...interface{})
- func (logger *Logger) Infos(args ...interface{})
- func (logger *Logger) Infot(msg string, fields ...zapcore.Field)
- func (logger *Logger) Panic(msg string, keyValues ...interface{})
- func (logger *Logger) Panics(args ...interface{})
- func (logger *Logger) Panict(msg string, fields ...zapcore.Field)
- func (logger *Logger) Warn(msg string, keyValues ...interface{})
- func (logger *Logger) Warns(args ...interface{})
- func (logger *Logger) Warnt(msg string, fields ...zapcore.Field)
Constants ¶
This section is empty.
Variables ¶
var Output string
Functions ¶
func ForwardLogs ¶
func ForwardLogs(logPipe io.ReadCloser) chan error
Types ¶
type Logger ¶
type Logger struct {
Unsugared *zap.Logger
*zap.SugaredLogger
}
func Configure ¶
Configure sets up the logging framework
In production, the container logs will be collected and file logging should be disabled. However, during development it's nicer to see logs as text and optionally write to a file when debugging problems in the containerized pipeline
The output log file will be located at /var/log/service-xyz/service-xyz.log and will be rolled according to configuration set.
func (*Logger) Debugt ¶
Debugt Use zap.String(key, value), zap.Int(key, value) to log fields. These fields will be marshalled as JSON in the logfile and key value pairs in the console!
func (*Logger) Errort ¶
Errort Use zap.String(key, value), zap.Int(key, value) to log fields. These fields will be marshalled as JSON in the logfile and key value pairs in the console!
func (*Logger) Fatalt ¶
Fatalt Use zap.String(key, value), zap.Int(key, value) to log fields. These fields will be marshalled as JSON in the logfile and key value pairs in the console!
func (*Logger) Infot ¶
Infot Use zap.String(key, value), zap.Int(key, value) to log fields. These fields will be marshalled as JSON in the logfile and key value pairs in the console!