-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
109 lines (78 loc) · 3.03 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# Alerta-JUL: A multicolored python tailer for logs
# Copyright (C) 2011 Cedric Gatay
# Forked from
# Copyright (C) 2008 Jordi Carrillo Bosch
# This file is part of Log4Tailer / Alerta-JUL Project.
#
# Alerta-JUL / Log4Tailer is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Alerta-JUL / Log4Tailer 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. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Alerta-JUL / Log4Tailer. If not, see <http://www.gnu.org/licenses/>.
*********************************************
Basic functionality
*********************************************
This a quick setup to get you up and running. Please refer to the
documentation provided in the log4tailer project webpage at googlecode:
http://code.google.com/p/log4tailer/
Installation:
Get the tar, Untar, cd bin and run :-)
If you want system wide (make sure to have python setuptools installed and system wide rights):
python setup.py install
Options:
Normal functionality:
log4tail pathToLogs
will tail the logs with colors.
log4tail -t "regex" pathToLogs
will tail the logs with colors and will emphasize the line that complies with the regex
Throttling:
log4tail --throttle secs pathToLogs
It will slow down the tailing if your application logs very fast
Silent Mode:
log4tail -s -c configfile fullpathToLogs
Silent Mode activates SMTP email action and alerts will be sent to
the address specified. Log4Tailer will request for the SMTP options
interactively.
Silent Mode basically daemonizes Log4Tailer monitoring the logs. In
case of a FATAL will send the log trace to the address specified.
You must provide the full path to the logs.
Color config parameters:
You can specify your own colors by providing the -c parameter
log4tail -c config.txt pathToLogs
where config.txt, you can specify:
warn = yellow
info = green
debug = black
error = magenta
fatal = red
The above are the defaults and work well with a white or clear terminal background.
You can add specific logging levels by using the following syntax
color.${level} = ${color}
where ${level} is the level pattern you want to match (or any other pattern...)
and ${color} is the color you want to use.
Valid colors are, their background counterparts are prefixed with 'on_' :
* white
* cyan
* magenta
* blue
* yellow
* green
* red
* black
* skip
Levels with the skip color will not be printed out in your console
(fast and easy way to disable an annoying message)
Other options, please refer to :
* the wiki in the original project webpage
* the log4tailconfig.txt file (heavily commented out)
For more explanation, details and options take a look at the UserGuide
provided.
Enjoy
Jordi & Cedric