Can lnav hide portions of a log line?

263 views
Skip to first unread message

Christopher Hunt

unread,
Feb 14, 2017, 5:21:18 PM2/14/17
to lnav
Hey there,

Thanks again for this great tool.

My log lines are very long, necessitated by the capturing of structured data in relation to the log message. Example:

2017-02-14T16:01:37Z node2 DEBUG ElasticsearchCollector [sourceThread=conductr-agent-akka.actor.default-dispatcher-2, akkaTimestamp=16:01:37.506UTC, akkaSource=akka.tcp://conduct...@192.168.77.22:2552/user/ElasticsearchCollector, sourceActorSystem=conductr-agent] - Posted to Elasticsearch and receive a response


It'd be great to hide the contents between the square brackets as it is generally not required. For example:

2017-02-14T16:01:37Z node2 DEBUG ElasticsearchCollector [...] - Posted to Elasticsearch and receive a response


...would be great.

Can lnav help me here? I didn't see anything obvious...

Cheers,
-C

Timothy Stack

unread,
Feb 14, 2017, 5:41:39 PM2/14/17
to Christopher Hunt, lnav

Earlier versions of lnav had support for doing this, but it was removed.  File a github issue
and I'll add it back.

I recently added a 'rewrite' mechanism[1], but that only works in the pretty-print view.  I think
just scrubbing out fields like this is something that can be done without any of the gotchas
that come with transforming fields, like performance and semantics of searching (does a
search find the original version or the transformed one?).

tim


On Tue, Feb 14, 2017 at 2:21 PM, Christopher Hunt <christop...@typesafe.com> wrote:
Hey there,

Thanks again for this great tool.

My log lines are very long, necessitated by the capturing of structured data in relation to the log message. Example:

2017-02-14T16:01:37Z node2 DEBUG ElasticsearchCollector [sourceThread=conductr-agent-akka.actor.default-dispatcher-2, akkaTimestamp=16:01:37.506UTC, akkaSource=akka.tcp://conductr-ag...@192.168.77.22:2552/user/ElasticsearchCollector, sourceActorSystem=conductr-agent] - Posted to Elasticsearch and receive a response


It'd be great to hide the contents between the square brackets as it is generally not required. For example:

2017-02-14T16:01:37Z node2 DEBUG ElasticsearchCollector [...] - Posted to Elasticsearch and receive a response


...would be great.

Can lnav help me here? I didn't see anything obvious...
 
Cheers,
-C

--
You received this message because you are subscribed to the Google Groups "lnav" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lnav+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Christopher Hunt

unread,
Feb 14, 2017, 6:02:17 PM2/14/17
to Timothy Stack, Christopher Hunt, lnav
Christopher Hunt
Technical Lead, Lightbend Production Suite
@huntchr
UTC+11

Reply all
Reply to author
Forward
0 new messages