mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
logparse.pl: option to pass through Event Log entries.
This makes it more feasible to use logparse.pl as an output filter on
a PuTTY SSH log file and discard the original file.
In particular, ever since commit b4fde270c
, I've been finding it
useful when testing new code to direct my SSH logs to a named pipe and
have another terminal window give a real-time dump of them by running
'while cat $named_pipe; do :; done'. Now I can replace the 'cat' in
that shell command with 'logparse.pl -ve' and still get the Event Log
messages as well as the unpacked contents of all the packets.
This commit is contained in:
parent
ec29d35403
commit
44dc516810
@ -7,12 +7,14 @@ use FileHandle;
|
||||
|
||||
my $dumpchannels = 0;
|
||||
my $dumpdata = 0;
|
||||
my $pass_through_events = 0;
|
||||
my $verbose_all;
|
||||
my %verbose_packet;
|
||||
GetOptions("dump-channels|c" => \$dumpchannels,
|
||||
"dump-data|d" => \$dumpdata,
|
||||
"verbose|v" => \$verbose_all,
|
||||
"full|f=s" => sub { $verbose_packet{$_[1]} = 1; },
|
||||
"events|e" => \$pass_through_events,
|
||||
"help" => sub { &usage(\*STDOUT, 0); })
|
||||
or &usage(\*STDERR, 1);
|
||||
|
||||
@ -988,6 +990,9 @@ while (<>) {
|
||||
$data = [];
|
||||
$recording = 1;
|
||||
}
|
||||
if ($pass_through_events && m/^Event Log: ([^\n]*)$/) {
|
||||
printf "event: $1\n";
|
||||
}
|
||||
}
|
||||
|
||||
if ($dumpchannels) {
|
||||
|
Loading…
Reference in New Issue
Block a user