Can I Use Apache’s log4j or log4j2?

Yes you can — CopyStorm supports both log4j and log4j2. This article contains the instructions you will need.

Using log4j

CopyStorm comes packaged with log4j — configuring configuring CopyStorm to use it is a two-step process:

  • Select the “Use Apache Logging” option on CopyStorm’s Advanced tab.
    • When checked, CopyStorm will use the Apache Commons Logging system rather than the default.
  • Edit the log4j.properties file in the “lib” subdirectory of the CopyStorm installation to match your logging preferences.

Use log4j2

To use the updated log4j2 with CopyStorm follow this process:

  • Download the log4j2 binaries.
  • Copy the following jars from log4j2 to the “lib” subdirectory of the CopyStorm installation:
    • log4j-api-2.5.jar
    • log4j-core-2.5.jar
    • log4j-jce-2.5.jar
      • This one is important — it is a bridge from log4j to log4j2.
  • Delete the following file from the “lib” subdirectory of the CopyStorm installation:
    • log4j-1.2.17.jar
  • Modify the log4.properties file in the “lib” subdirectory of the CopyStorm installation or create a new style log4j2.xml file and store it in the “lib” subdirectory.
  • Check the “Use Apache Logging” option on CopyStorm’s Advanced tab.
    • When checked, CopyStorm will use the Apache Commons Logging system instead of the default.

That’s it! The next time you run CopyStorm with the “Use Apache Logging” option checked log4j2 will be used.