mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-10-23 05:04:07 +00:00
to the kata-containers repo under the src/tools/log-parser folder and vendor the modules Fixes: #4100 Signed-off-by: Snir Sheriber <ssheribe@redhat.com>
24 lines
386 B
Go
24 lines
386 B
Go
//
|
|
// Copyright (c) 2018 Intel Corporation
|
|
//
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
//
|
|
|
|
package main
|
|
|
|
import (
|
|
"encoding/json"
|
|
"os"
|
|
)
|
|
|
|
type displayJSON struct {
|
|
}
|
|
|
|
func (d *displayJSON) Display(entries *LogEntries, fieldNames []string, file *os.File) error {
|
|
encoder := json.NewEncoder(file)
|
|
|
|
encoder.SetIndent(displayPrefix, displayIndentValue)
|
|
|
|
return encoder.Encode(entries)
|
|
}
|