Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ import ru.d10xa.jsonlogviewer.logfmt.LogfmtLogLineParser
import ru.d10xa.jsonlogviewer.shell.ShellImpl

import scala.util.matching.Regex
import scala.util.Failure
import scala.util.Success
import scala.util.Try

object LogViewerStream {

Expand Down Expand Up @@ -118,7 +121,12 @@ object LogViewerStream {
effectiveConfig.timestamp.before
)
)
.map(outputLineFormatter.formatLine)
.map(pr =>
Try(outputLineFormatter.formatLine(pr)) match {
case Success(formatted) => formatted.toString
case Failure(_) => pr.raw
}
)
.map(_.toString)
} yield evaluatedLine

Expand Down
Loading