@@ -196,16 +196,16 @@ func logfmt(buf *bytes.Buffer, ctx []interface{}, color int, term bool) {
196196 buf .WriteByte ('\n' )
197197}
198198
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 )
203203}
204204
205- // JsonFormatEx formats log records as JSON objects. If pretty is true,
205+ // JSONFormatEx formats log records as JSON objects. If pretty is true,
206206// records will be pretty-printed. If lineSeparated is true, records
207207// will be logged with a new line between each record.
208- func JsonFormatEx (pretty , lineSeparated bool ) Format {
208+ func JSONFormatEx (pretty , lineSeparated bool ) Format {
209209 jsonMarshal := json .Marshal
210210 if pretty {
211211 jsonMarshal = func (v interface {}) ([]byte , error ) {
@@ -225,7 +225,7 @@ func JsonFormatEx(pretty, lineSeparated bool) Format {
225225 if ! ok {
226226 props [errorKey ] = fmt .Sprintf ("%+v is not a string key" , r .Ctx [i ])
227227 }
228- props [k ] = formatJsonValue (r .Ctx [i + 1 ])
228+ props [k ] = formatJSONValue (r .Ctx [i + 1 ])
229229 }
230230
231231 b , err := jsonMarshal (props )
@@ -270,7 +270,7 @@ func formatShared(value interface{}) (result interface{}) {
270270 }
271271}
272272
273- func formatJsonValue (value interface {}) interface {} {
273+ func formatJSONValue (value interface {}) interface {} {
274274 value = formatShared (value )
275275 switch value .(type ) {
276276 case int , int8 , int16 , int32 , int64 , float32 , float64 , uint , uint8 , uint16 , uint32 , uint64 , string :
0 commit comments