Implement the show command (#53)
This commit is contained in:
parent
b9b555ba68
commit
f425d3f007
14 changed files with 231 additions and 55 deletions
|
|
@ -129,3 +129,14 @@ func logMeasurementSummary(w io.Writer, f log.Fields) error {
|
|||
|
||||
return nil
|
||||
}
|
||||
|
||||
func logMeasurementJSON(w io.Writer, f log.Fields) error {
|
||||
m := f.Get("measurement_json").(map[string]interface{})
|
||||
|
||||
json, err := json.MarshalIndent(m, "", " ")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
fmt.Fprintf(w, string(json))
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue