Documentation ¶
Index ¶
Constants ¶
View Source
const (
// AlertWebHook https://developer.work.weixin.qq.com/document/path/91770
AlertWebHook = "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx"
)
Variables ¶
This section is empty.
Functions ¶
func NewAlertEncoder ¶
func NewAlertEncoder(encoderConf zapcore.EncoderConfig, webhook string) zapcore.Encoder
Types ¶
type AlertEncoder ¶
func (*AlertEncoder) EncodeEntry ¶
func (a *AlertEncoder) EncodeEntry(entry zapcore.Entry, fields []zapcore.Field) (buf *buffer.Buffer, err error)
EncodeEntry alertEncoder encodeEntry
type LogContent ¶
type WeComWebHookReply ¶
type ZapLogger ¶
type ZapLogger struct { Sync func() error // contains filtered or unexported fields }
func NewZapLogger ¶
func NewZapLogger(encConf zapcore.EncoderConfig, level zap.AtomicLevel, alert bool, webhook string, opts ...zap.Option) *ZapLogger
NewZapLogger return a zaplog logger.
Click to show internal directories.
Click to hide internal directories.