-
Notifications
You must be signed in to change notification settings - Fork 23
/
README
33 lines (24 loc) · 1.15 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
Scribe log4j Appender
====================================
Much of this work is based on Alex Loddengaard (http://github.com/alexlod/scribe-log4j-appender).
I cleaned up his code to work in non-hadoop environments. I added support to reconnect if it loses a connection or if scribe goes away.
You will need the following libraries for your project, which are in lib/ folder for convenience:
./lib/libthrift-r808609.jar
./lib/log4j-1.2.15.jar
./lib/slf4j-api-1.5.8.jar
./lib/slf4j-log4j12-1.5.8.jar
Example to enable in log4j:
# Add scribe to end of rootLogger:
log4j.rootLogger=DEBUG,stdout,scribe
#
# Add this to your log4j.properties
#
# You can adjust the scribe_host and scribe_port you want messages sent to by setting
# scribe_host and scribe_port
#
# You can also set the hostname if you do not want to rely on Java picking the correct hostname
log4j.appender.scribe=org.apache.log4j.scribe.ScribeAppender
log4j.appender.scribe.scribe_category=MyScribeCategoryName
log4j.appender.scribe.DatePattern='.'yyyy-MM-dd-HH
log4j.appender.scribe.layout=org.apache.log4j.PatternLayout
log4j.appender.scribe.layout.ConversionPattern=%5p [%t] %d{ISO8601} %F (line %L) %m%n