NAME
Tail::Tool::Config - Description of the configuration of Tail::Tool
VERSION
This documentation refers to Tail::Tool::Config version 0.4.6
DESCRIPTION
The Tail::Tool application stores it's configuration in ~/.tailtrc
it allows the use of multiple separate named configurations. Which you can specify on the command line via --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 (--restart
) option tailt
can save your settings to a config file. At a later point you can use the --config
> option to retrieve those settings.
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))+))[}])[^}]*[}]'
Pre-Process Plugins
- !!perl/hash:Tail::Tool::Plugin::GroupLines
- !!perl/hash:Tail::Tool::Plugin::Ignore
- !!perl/hash:Tail::Tool::Plugin::Spacing
Post-Process Plugins
- !!perl/hash:Tail::Tool::Plugin::Highlight
- !!perl/hash:Tail::Tool::Plugin::Match.pm
- !!perl/hash:Tail::Tool::Plugin::Replace.pm
BUGS AND LIMITATIONS
There are no known bugs in this module.
Please report problems to Ivan Wills (ivan.wills@gmail.com).
Patches are welcome.
AUTHOR
Ivan Wills - (ivan.wills@gmail.com)
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 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.