Skip to content
Animesh Trivedi edited this page Sep 12, 2018 · 1 revision

Setting up log4j

Animesh Trivedi [11:39 AM]
hey jonas, do you know how to use log4j for a standalone java program?
I am trying to enable log4j debugging for arrow but cannot get it working :disappointed:
I suspect configuration is not right or somethign

Jonas Pfefferle [11:40 AM]
I think you can enable it from the java command line

Animesh Trivedi [11:40 AM]
i am trying to pass the config file in the classpath (obviosuly this is not working)

java -cp log4j.properties:./target/arrowexample-1.0-jar-with-dependencies.jar com.github.animeshtrivedi.arrowexample.ArrowWrite

Jonas Pfefferle [11:41 AM]
what if you only include the folder
resp java -cp .:./target..

Animesh Trivedi [11:42 AM]
smart !
yup, it works now

Jonas Pfefferle [11:42 AM]
nice
Clone this wiki locally