The same problem happened to me. I found that log4j seems ok, it use a counter to record the size while writing data.