This week's book giveaway is in the Reactive Progamming forum. We're giving away four copies of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams and have Adam Davis on-line! See this thread for details.
log file not getting created or written to using log4j
I have a core java application deployed in unix.I have created a jar of the application MyApp.jar.I am calling this jar from a script Myscript.ksh I am trying to add logging for the application but on running it the log file does not get created.
I have followed the below steps:
1) In the same folder as the main class of the jar I have put log4j.properties.In this file I have specified the file to be created during logging.
2) I use a build.xml file to create the MyApp.jar. In this build.xml I have put lines to have the jars for log4j in the classpath along with java.
3) In the script Myscript.ksh also I have put lines to have the jars for log4j in the classpath along with java.
When I call MyApp.jar using Myscript.jar it does not create the log file.Have I missed any step.Please advice.thanks
posted 4 years ago
Does log4j related jars need to be only on Classpath or PATH also?There are no error messages which may be helpful to debug.On running it nothing happens for the log and no error message related to log.