LogViewPlus Support

Parsing single line JSON log

https://www.logviewplus.com/forum/Topic2473.aspx

By MBecer - 10 Oct 2025

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}"
    }
}
By LogViewPlus Support - 10 Oct 2025

Hi MBecer,

LogViewPlus is build to tail log files.  It does this by attempting to read a log file line by line.

It sounds like your JSON log is actually one big JSON file, so the tail feature would never be used.  All of the objects are written at once and there is no need to separate them out line by line.

If this is not the case, it may help if I could see a few sample log entries.

In this case your 'manual' solution is probably best.  I would suggest replacing the tabs with new lines using a script or batch file and running that command before opening the file.

Hope that helps,

Toby
By MBecer - 11 Oct 2025

Thanks!
Took some time but worked perfectly!
By LogViewPlus Support - 11 Oct 2025

Glad that helped - thanks for letting me know!  :-)