Documentation
¶
Index ¶
- Constants
- func Debug(template string, args ...interface{})
- func Debugw(msg string, keysAndValues ...interface{})
- func Error(template string, args ...interface{})
- func Errorw(msg string, keysAndValues ...interface{})
- func Fatal(template string, args ...interface{})
- func Fatalw(msg string, keysAndValues ...interface{})
- func Info(template string, args ...interface{})
- func Infow(msg string, keysAndValues ...interface{})
- func Init(opts ...Option) error
- func Sync()
- func Warning(template string, args ...interface{})
- func Warningw(msg string, keysAndValues ...interface{})
- func ZapLogger() *zap.Logger
- func ZapSuger() *zap.SugaredLogger
- type Option
Constants ¶
View Source
const ( // DebugLevel logs are typically voluminous, and are usually disabled in // production. DebugLevel = zap.DebugLevel // InfoLevel is the default logging priority. InfoLevel = zap.InfoLevel // WarningLevel logs are more important than Info, but don't need individual // human review. WarningLevel = zap.WarnLevel // ErrorLevel logs are high-priority. If an application is running smoothly, // it shouldn't generate any error-level logs. ErrorLevel = zap.ErrorLevel // FatalLevel logs a message, then calls os.Exit(1). FatalLevel = zap.FatalLevel )
Variables ¶
This section is empty.
Functions ¶
func ZapSuger ¶
func ZapSuger() *zap.SugaredLogger
Types ¶
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option configures how we set up the zap logger.
func WithCompress ¶
WithCompress determines if compress rolled file
func WithConsole ¶
WithConsole determines weather output to console
func WithLogLevel ¶
WithLogLevel determines which level to log
func WithLogName ¶
WithLogName determines which name to create log files
func WithLogPath ¶
WithLogPath determines which path to create log files
func WithMaxLogSize ¶
WithMaxLogSize determines max file size of a log file
func WithOnlyConsole ¶
WithOnlyConsole determines weather output to console
Click to show internal directories.
Click to hide internal directories.