Skip to content

Commit 508bba1

Browse files
committed
read: include IP in JSON output
This is already the case for CSV and TSV.
1 parent 03fb810 commit 508bba1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/cmd_read.go

+5
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,11 @@ func CmdRead(f CmdReadFlags, args []string, printHelp func()) error {
111111
}
112112
continue
113113
}
114+
115+
if f.Format == "json-compact" || f.Format == "json-pretty" {
116+
record["ip"] = ip
117+
}
118+
114119
recordStr := mapInterfaceToStr(record)
115120

116121
if !hdrWritten {

0 commit comments

Comments
 (0)