jvz commented on a change in pull request #4: Allow to read gzip files.
URL: https://github.com/apache/logging-chainsaw/pull/4#discussion_r253627642
##########
File path:
src/main/java/org/apache/log4j/chainsaw/vfs/VFSLogFilePatternReceiver.java
##########
@@ -403,8 +409,16 @@ public void run() {
} catch (Error err) {
getLogger().info(getPath() + " - unable to
refresh fileobject", err);
}
+
+ if(IsGZip(getFileURL())) {
+ InputStream gzipStream = new
GZIPInputStream(fileObject.getContent().getInputStream());
+ Reader decoder = new
InputStreamReader(gzipStream, "UTF-8");
+ BufferedReader bufferedReader = new
BufferedReader(decoder);
+ process(bufferedReader);
+ readingFinished = true;
+ }
//could have been truncated or appended to (don't
do anything if same size)
- if (fileObject.getContent().getSize() <
lastFileSize) {
+ if (fileObject.getContent().getSize() <
lastFileSize) {
Review comment:
Looks like an errant space here.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services