Custom DfMethods' logs don't show up in Content Server when running in Documentum

Hello,

We have a Java application with bunch of custom methods which also have logging. When I execute the methods within IDE or the JAR file in a CLI, the logs work perfectly fine both in console and in filesystem (log files are being created). When I deploy my JAR to Documentum and run a method in Documentum, weather by running a Job or the method directly, the method functions as expected but the log files don't appear in the Content Server.

We deploy using Composer. We have JAR Definitions for the dependencies and our Java application. We have created a module for each method, a method for each module and one or more jobs for each method (based on the need).

Does anyone know what is going on?

Note: This is a clean Documentum environment @ 23.4 and we got our code from another Documentum environment @ 7.3 with Java 8 and compiled the application with Java 17 fixed some issues that we had and the project seems stable on itself.

Tagged:

Best Answer

  • Hicham Bahi
    Hicham Bahi E Member
    #2 Answer ✓

    You need to figure out which log4j configuration is being used. This depends how you method is launched: is it running within the Java Method Server (dm_method.run_as_server = True) or do you launch a new JRE ? In the former case, it is probably using log4j2.properties located under the DmMethods webapp of JMS. If you don't use the JMS, then you need to make sure that the JRE finds the log4j configuration (different ways to do that; you can google that on your own).

    Also keep in mind that DFC switched from log4j to log4j2. I assume that you migrated your logging code to log4j2 and therefore the configuration should be in log4j2.properties.

Answers

  • Hicham Bahi
    Hicham Bahi E Member
    #3 Answer ✓

    You need to figure out which log4j configuration is being used. This depends how you method is launched: is it running within the Java Method Server (dm_method.run_as_server = True) or do you launch a new JRE ? In the former case, it is probably using log4j2.properties located under the DmMethods webapp of JMS. If you don't use the JMS, then you need to make sure that the JRE finds the log4j configuration (different ways to do that; you can google that on your own).

    Also keep in mind that DFC switched from log4j to log4j2. I assume that you migrated your logging code to log4j2 and therefore the configuration should be in log4j2.properties.

  • Inserting log4j2.properties under Documentum/tomcat/webapps/DmMethod/WEB-INF/classes/ worked for me. Thanks

  • You're welcome! Please mark the question as answered.