Bug 53791 - Enabling compression of backups using the log4j.properties file in Hadoop & HBase.
Summary: Enabling compression of backups using the log4j.properties file in Hadoop & H...
Status: NEW
Alias: None
Product: Log4j - Now in Jira
Classification: Unclassified
Component: Appender (show other bugs)
Version: 1.2.17
Hardware: Other Linux
: P2 enhancement
Target Milestone: ---
Assignee: log4j-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-28 19:44 UTC by John Lewis
Modified: 2012-08-28 19:50 UTC (History)
0 users



Attachments
Patch using the `diff -crB original_dir/ modified_dir/ > log4j.patch` command. (6.71 KB, patch)
2012-08-28 19:44 UTC, John Lewis
Details | Diff
Patch created using `diff -ur original_dir/ modified_dir/ > log4jProper.patch` command. (5.58 KB, patch)
2012-08-28 19:47 UTC, John Lewis
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Lewis 2012-08-28 19:44:41 UTC
Created attachment 29293 [details]
Patch using the `diff -crB original_dir/ modified_dir/ > log4j.patch` command.

When using Hadoop and HBase, we tend to get massive log files which waste space when using the RollingLogAppender class. From the Google search, many sites inform that Log4J supports the compression of the rotated backups but only when using the log4j.xml file. Currently Apache Hadoop and HBase only support the use of the log4j.properties file.

To avoid trying to translate the log4j.properties file in xml format, we simply modified the RollingLogAppender class to allow for the GZ compression of backup files by simply adding the ".compressBackups=true" to the properties file.
Comment 1 John Lewis 2012-08-28 19:47:33 UTC
Created attachment 29294 [details]
Patch created using `diff -ur original_dir/ modified_dir/ > log4jProper.patch` command.