Big changes in Log4j. Now it works correctly. And minor changes in other files.