=head1 NAME

Tail::Tool::Config - Description of the configuration of Tail::Tool

=head1 VERSION

This documentation refers to Tail::Tool::Config version 0.4.8

=head1 DESCRIPTION

The L<Tail::Tool> application stores it's configuration in C<~/.tailtrc> it
allows the use of multiple separate named configurations. Which you can
specify on the command line via C<--config> argument. The file is a YAML
format config file that allows you to specify the plugins to load and their
configurations.

When you use the restart (C<--restart>) option C<tailt> can save your settings
to a config file. At a later point you can use the C<--config>> option to
retrieve those settings.

=head1 CONFIGURATION

Example configuration:

  ---
  configs:
    # the is a named configuration
    log4perl:
      # Specify any PRE process plugins
      pre_process:
        # GroupLines allows you to controll when a new is considered finished.
        - !!perl/hash:Tail::Tool::Plugin::GroupLines
          regex:
            - !!perl/hash:Tail::Tool::Regex
              enabled: 1
              # this is matching on a date string in square brackets at the
              # start of a line
              regex: !!perl/regexp '(?-xism:^\[\d\d\d\d/\d\d/\d\d \d\d:\d\d:\d\d\])'
        # Spacing allows you inject blank lines when nothing has happened for
        # a period of time. In this case after 8 seconds, insert 2 blank lines
        # after 15 seconds insert 5 blank lines
        - !!perl/hash:Tail::Tool::Plugin::Spacing
          last_time: 1300055107
          lines:
            - 2
            - 5
          many: 0
          post: 0
          times:
            - 8
            - 15
        - !!perl/hash:Tail::Tool::Plugin::Ignore
          many: 1
          post: 0
          regex:
            - !!perl/hash:Tail::Tool::Regex
              enabled: 0
              regex: !!perl/regexp (?-xism:MyApp::Annoying)
        # Ignore plugin allows you hide certain lines (in this case any line
        # containing MyApp::Session)
        - !!perl/hash:Tail::Tool::Plugin::Ignore
          many: 1
          post: 0
          regex:
            - !!perl/hash:Tail::Tool::Regex
              enabled: 0
              regex: !!perl/regexp (?-xism:MyApp::Session)
      # specify any POST process plugins
      post_process:
        # The Highlight plugin allows you to colour parts of a line
        # The follwoing example highlights WARN / ERRROR AND FATAL
        # messages in yellow / red and magenta respectivly
        - !!perl/hash:Tail::Tool::Plugin::Highlight
          many: 1
          post: 1
          regex:
            - !!perl/hash:Tail::Tool::Regex
              colour:
                - yellow
              enabled: 1
              regex: !!perl/regexp (?-xism:\bWARN\b)
            - !!perl/hash:Tail::Tool::Regex
              colour:
                - red
              enabled: 1
              regex: !!perl/regexp (?-xism:\bERROR\b)
            - !!perl/hash:Tail::Tool::Regex
              colour:
                - magenta
                - bold
              enabled: 1
              regex: !!perl/regexp (?-xism:\bFATAL\b)
            # This is an example of highliting a balanced bracket object
            - !!perl/hash:Tail::Tool::Regex
              colour:
                - magenta
              enabled: 1
              regex: '[{]"\w\w\w:\w+Request":([{](?:(?:(?>[^{}]+|(?1))+))[}])[^}]*[}]'

=head1 Pre-Process Plugins

=over 4

=item !!perl/hash:Tail::Tool::Plugin::GroupLines

See L<Tail::Tool::Plugin::GroupLines>

=item !!perl/hash:Tail::Tool::Plugin::Ignore

See L<Tail::Tool::Plugin::Ignore>

=item !!perl/hash:Tail::Tool::Plugin::Spacing

See L<Tail::Tool::Plugin::Spacing>

=back

=head1 Post-Process Plugins

=over 4

=item !!perl/hash:Tail::Tool::Plugin::Highlight

See L<Tail::Tool::Plugin::Highlight>

=item !!perl/hash:Tail::Tool::Plugin::Match.pm

See L<Tail::Tool::Plugin::Match.pm>

=item !!perl/hash:Tail::Tool::Plugin::Replace.pm

See L<Tail::Tool::Plugin::Replace.pm>

=back

=head1 BUGS AND LIMITATIONS

There are no known bugs in this module.

Please report problems to Ivan Wills (ivan.wills@gmail.com).

Patches are welcome.

=head1 AUTHOR

Ivan Wills - (ivan.wills@gmail.com)

=head1 LICENSE AND COPYRIGHT

Copyright (c) 2016 Ivan Wills (14 Mullion Close, Hornsby Heights, NSW Australia 2077).
All rights reserved.

This module is free software; you can redistribute it and/or modify it under
the same terms as Perl itself. See L<perlartistic>.  This program is
distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

=cut

