Skip to content

Commit

Permalink
add log
Browse files Browse the repository at this point in the history
  • Loading branch information
Artem Golovko committed Dec 9, 2020
1 parent 3b79eca commit 3d835ef
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main/kotlin/DataCompressor.kt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ object DataCompressor : Compressor {

chain.dropLast(1).forEach {
val tempOutputStream = currentOutputTempFile.outputStream().buffered()
it.process(currentInputStream, tempOutputStream)
it.also { println("Processing ${it::class.simpleName}...") }
.process(currentInputStream, tempOutputStream)

if (currentOutputTempFile == tempFile1) {
currentInputStream = tempFile1.inputStream().buffered()
Expand All @@ -44,7 +45,9 @@ object DataCompressor : Compressor {
currentOutputTempFile = tempFile1
}
}
chain.last().process(currentInputStream, output)
chain.last()
.also { println("Processing ${it::class.simpleName}...") }
.process(currentInputStream, output)

tempFile1.delete()
tempFile2.delete()
Expand Down

0 comments on commit 3d835ef

Please sign in to comment.