log4j.properties for vertx modules

56 views
Skip to first unread message

Aride Chettali

unread,
Apr 16, 2015, 11:56:21 AM4/16/15
to ve...@googlegroups.com

I will be having two or more modules deployed to the single vert.x instance(container), the problem I am facing is how can I have different log4j.properties file for each these modules.

I will be deploying modules as follows

vertx runmod com.xxx.xxx~mod1~1.0

vertx runmod com.xxx.xxx~mod2~1.0

Both modules should have its own log4j.properties file and this property file should be outside of .zip file. So that the files can be modifiable.

Alexander Lehmann

unread,
Apr 16, 2015, 1:21:32 PM4/16/15
to ve...@googlegroups.com
I think you can add a classpath as option to the vertx command and set that to . to load your log4j.properties file from the the current dir or to e.g. mod1 or mod2 to load it from there

Aride Chettali

unread,
Apr 16, 2015, 1:29:30 PM4/16/15
to ve...@googlegroups.com
Thanks for your reply Alexander Lehmann, the problem with this approach is that when I use runmod with -cp then I am overriding the default class path. So jars inside the lib folder an all will not be in class path. Any other solution ?

Alexander Lehmann

unread,
Apr 16, 2015, 1:51:06 PM4/16/15
to ve...@googlegroups.com
I think you can set CLASSPATH to add something to the classpath before starting vertx

Aride Chettali

unread,
Apr 17, 2015, 12:04:59 AM4/17/15
to ve...@googlegroups.com
Thank You, That worked
Reply all
Reply to author
Forward
0 new messages