Skip to content

Commit

Permalink
Adding comments to example YAML
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanwills-optus committed Dec 2, 2016
1 parent e24575c commit d8b1757
Showing 1 changed file with 41 additions and 26 deletions.
67 changes: 41 additions & 26 deletions lib/Tail/Tool/Config.pod
Original file line number Diff line number Diff line change
Expand Up @@ -21,39 +21,21 @@ to a config file.

---
configs:
# the is a named configuration
log4perl:
post_process:
- !!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)
- !!perl/hash:Tail::Tool::Regex
colour:
- magenta
enabled: 1
regex: '[{]"\w\w\w:\w+Request":([{](?:(?:(?>[^{}]+|(?1))+))[}])[^}]*[}]'
# 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:
Expand All @@ -71,13 +53,46 @@ to a config file.
- !!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 BUGS AND LIMITATIONS

Expand Down

0 comments on commit d8b1757

Please sign in to comment.