Parsing single line JSON log


Author
Message
MBecer
MBecer
New Member (4 reputation)New Member (4 reputation)New Member (4 reputation)New Member (4 reputation)New Member (4 reputation)New Member (4 reputation)New Member (4 reputation)New Member (4 reputation)New Member (4 reputation)
Group: Forum Members
Posts: 2, Visits: 3
Hi,
I regularly receive log files, which contain a set of JSON entries, but unfortunately, these entries are all in a singe line, separated by tab instead of line break.
The JSON parser works fine, once i "manually" replace all \t with \n outside of LogView, but I'd like to not do this at all and just load the files. Is there an easy way to achieve this, without the need to write a custom reader (or does someone already have such a parser i can get?).
Once broken up into several lines, this Json Parser works fine for me:
{
    "time": "%d{yyyy-MM-ddT%H:mm:ss.fffffffffZ}",
    "stream": "%S{stream}",
    "_p": "%S{_p}",
    "log": "%S{log}",
    "kubernetes": {
        "pod_name": "%S{pod_name}",
        "namespace_name": "%S{namespace_name}",
        "pod_id": "%S{pod_id}",
        "host": "%S{host}",
        "container_name": "%S{container_name}",
        "docker_id": "%S{docker_id}",
        "container_hash": "%m",
        "container_image": "%S{container_image}"
    }
}
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
MBecer - 3 days ago @ 1:49 PM
LogViewPlus Support - 3 days ago @ 1:58 PM
MBecer - 2 days ago @ 12:14 PM
                 Glad that helped - thanks for letting me know! :-)
LogViewPlus Support - 2 days ago @ 1:04 PM

Similar Topics

Login

Explore
Messages
Mentions
Search