Bool constructs a field that carries a bool.
(key string, val bool)
| 61 | |
| 62 | // Bool constructs a field that carries a bool. |
| 63 | func Bool(key string, val bool) Field { |
| 64 | var ival int64 |
| 65 | if val { |
| 66 | ival = 1 |
| 67 | } |
| 68 | return Field{Key: key, Type: zapcore.BoolType, Integer: ival} |
| 69 | } |
| 70 | |
| 71 | // Boolp constructs a field that carries a *bool. The returned Field will safely |
| 72 | // and explicitly represent `nil` when appropriate. |
no outgoing calls
searching dependent graphs…