@@ -196,16 +196,16 @@ func logfmt(buf *bytes.Buffer, ctx []interface{}, color int, term bool) {
196
196
buf .WriteByte ('\n' )
197
197
}
198
198
199
- // JsonFormat formats log records as JSON objects separated by newlines.
200
- // It is the equivalent of JsonFormatEx (false, true).
201
- func JsonFormat () Format {
202
- return JsonFormatEx (false , true )
199
+ // JSONFormat formats log records as JSON objects separated by newlines.
200
+ // It is the equivalent of JSONFormatEx (false, true).
201
+ func JSONFormat () Format {
202
+ return JSONFormatEx (false , true )
203
203
}
204
204
205
- // JsonFormatEx formats log records as JSON objects. If pretty is true,
205
+ // JSONFormatEx formats log records as JSON objects. If pretty is true,
206
206
// records will be pretty-printed. If lineSeparated is true, records
207
207
// will be logged with a new line between each record.
208
- func JsonFormatEx (pretty , lineSeparated bool ) Format {
208
+ func JSONFormatEx (pretty , lineSeparated bool ) Format {
209
209
jsonMarshal := json .Marshal
210
210
if pretty {
211
211
jsonMarshal = func (v interface {}) ([]byte , error ) {
@@ -225,7 +225,7 @@ func JsonFormatEx(pretty, lineSeparated bool) Format {
225
225
if ! ok {
226
226
props [errorKey ] = fmt .Sprintf ("%+v is not a string key" , r .Ctx [i ])
227
227
}
228
- props [k ] = formatJsonValue (r .Ctx [i + 1 ])
228
+ props [k ] = formatJSONValue (r .Ctx [i + 1 ])
229
229
}
230
230
231
231
b , err := jsonMarshal (props )
@@ -270,7 +270,7 @@ func formatShared(value interface{}) (result interface{}) {
270
270
}
271
271
}
272
272
273
- func formatJsonValue (value interface {}) interface {} {
273
+ func formatJSONValue (value interface {}) interface {} {
274
274
value = formatShared (value )
275
275
switch value .(type ) {
276
276
case int , int8 , int16 , int32 , int64 , float32 , float64 , uint , uint8 , uint16 , uint32 , uint64 , string :
0 commit comments