| 1 | #!/usr/local/bin/perl | ||
| 2 | |||
| 3 | 16 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 16 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 16 | ▶ | use Log::Munger::App; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 16 | Log::Munger::App->run; | |
| 8 | |||
| 9 | =head1 NAME | ||
| 10 | |||
| 11 | log_munger - Extract structured fields from log records using YAML rule files. | ||
| 12 | |||
| 13 | =head1 SYNOPSIS | ||
| 14 | |||
| 15 | log_munger commands | ||
| 16 | |||
| 17 | log_munger help <command> | ||
| 18 | |||
| 19 | log_munger munge -r <rule file> [-s <item>] [--raw] [-g <mmdb>] | ||
| 20 | |||
| 21 | log_munger enrich -r <rule file> [--raw] [--flat] [--drop-unmatched] [-g <mmdb>] | ||
| 22 | |||
| 23 | log_munger explain -r <rule file> [-s <item>] [--raw] [-g <mmdb>] | ||
| 24 | |||
| 25 | log_munger test_all [-v] | ||
| 26 | |||
| 27 | =head1 DESCRIPTION | ||
| 28 | |||
| 29 | The command line front end to L<Log::Munger>. Feed it a decoded log record as | ||
| 30 | JSON, NDJSON on stdin, or a raw log line with C<--raw>, and it runs the record | ||
| 31 | through the named rule files, printing the fields the first matching rule | ||
| 32 | captured. | ||
| 33 | |||
| 34 | C<log_munger commands> lists every subcommand and C<log_munger help E<lt>commandE<gt>> | ||
| 35 | gives the usage for one. The C<docs/> directory in the distribution covers the | ||
| 36 | CLI, the rule file format, and writing rule files in full. | ||
| 37 | |||
| 38 | =head1 SEE ALSO | ||
| 39 | |||
| 40 | L<Log::Munger> | ||
| 41 | |||
| 42 | =cut | ||