-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathtypes.go
105 lines (99 loc) · 3.07 KB
/
types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
/*
* Tencent is pleased to support the open source community by making TKEStack
* available.
*
* Copyright (C) 2012-2019 Tencent. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use
* this file except in compliance with the License. You may obtain a copy of the
* License at
*
* https://opensource.org/licenses/Apache-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/
package log
import (
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
)
// Field is an alias for the field structure in the underlying log frame.
type Field = zapcore.Field
// Level is an alias for the level structure in the underlying log frame.
type Level = zapcore.Level
var (
// DebugLevel logs are typically voluminous, and are usually disabled in
// production.
DebugLevel = zapcore.DebugLevel
// InfoLevel is the default logging priority.
InfoLevel = zapcore.InfoLevel
// WarnLevel logs are more important than Info, but don't need individual
// human review.
WarnLevel = zapcore.WarnLevel
// ErrorLevel logs are high-priority. If an application is running smoothly,
// it shouldn't generate any error-level logs.
ErrorLevel = zapcore.ErrorLevel
// DPanicLevel logs are particularly important errors. In development the
// logger panics after writing the message.
DPanicLevel = zapcore.DPanicLevel
// PanicLevel logs a message, then panics.
PanicLevel = zapcore.PanicLevel
// FatalLevel logs a message, then calls os.Exit(1).
FatalLevel = zapcore.FatalLevel
)
// Alias for zap type functions.
var (
Any = zap.Any
Array = zap.Array
Object = zap.Object
Binary = zap.Binary
Bool = zap.Bool
Bools = zap.Bools
ByteString = zap.ByteString
ByteStrings = zap.ByteStrings
Complex64 = zap.Complex64
Complex64s = zap.Complex64s
Complex128 = zap.Complex128
Complex128s = zap.Complex128s
Duration = zap.Duration
Durations = zap.Durations
Err = zap.Error
Errors = zap.Errors
Float32 = zap.Float32
Float32s = zap.Float32s
Float64 = zap.Float64
Float64s = zap.Float64s
Int = zap.Int
Ints = zap.Ints
Int8 = zap.Int8
Int8s = zap.Int8s
Int16 = zap.Int16
Int16s = zap.Int16s
Int32 = zap.Int32
Int32s = zap.Int32s
Int64 = zap.Int64
Int64s = zap.Int64s
Namespace = zap.Namespace
Reflect = zap.Reflect
Stack = zap.Stack
String = zap.String
Stringer = zap.Stringer
Strings = zap.Strings
Time = zap.Time
Times = zap.Times
Uint = zap.Uint
Uints = zap.Uints
Uint8 = zap.Uint8
Uint8s = zap.Uint8s
Uint16 = zap.Uint16
Uint16s = zap.Uint16s
Uint32 = zap.Uint32
Uint32s = zap.Uint32s
Uint64 = zap.Uint64
Uint64s = zap.Uint64s
Uintptr = zap.Uintptr
Uintptrs = zap.Uintptrs
)