-
1. Re: Jboss7.x + Common Log file location + cluster mode
dj.ruoss Dec 11, 2013 8:02 AM (in response to sabbirali)hi,
i have the same needs and looking for server node name variable to insert in the log4j path appender, but still not found the way.
can anyone advice us?
thanks in advance
-
2. Re: Jboss7.x + Common Log file location + cluster mode
wdfink Dec 11, 2013 8:58 AM (in response to dj.ruoss)You can use this for the FILE handler:
<file path="/mylog/server-${jboss.node.name}.log"/>
You need to set the jboss.node.name if you have all instances at the same physical machine.
I prefer to link the log directory to another location or vice-versa, in that case you did not have the need to change the configuration.
But you should not point to a mounted filesystem as this might cause issues.
-
3. Re: Jboss7.x + Common Log file location + cluster mode
indranil32 Dec 11, 2013 9:42 AM (in response to sabbirali)If you are using the $JBOSS_HOME/bin/domain.sh or any service script [script in /etc/rc.d/init.d] to start the server, there you can supply the ${jboss.server.log.dir} at startup:
-Djboss.server.log.dir=/where/ever/you/want
This gives you the advantage, that, if you are using log4j to configure your application's logging and use the same ${jboss.server.log.dir} env. in the rolling appender path, all your logs are in the same folder.
Note: If your jboss is running as some $JBOSS_USER, that user must have RW permissions on /where/ever/you/want directory.
-
4. Re: Jboss7.x + Common Log file location + cluster mode
dj.ruoss Dec 11, 2013 10:04 AM (in response to wdfink)hi Dear Wolf-Dieter Fink very appreciated your post....
It was very usefull.
One more thing:
But you should not point to a mounted filesystem as this might cause issues.
i am quite worried about this: i'm going to use a LUN/SAN to mount to /project/applicationslogs, may i have issues?
thank you again.
-
5. Re: Jboss7.x + Common Log file location + cluster mode
wdfink Dec 12, 2013 4:27 AM (in response to dj.ruoss)"mounted" might be a bit unclear, sorry.
What I meant was if you use slower filesystems like NFS, Samba ... in that case the IO might to slow and the applications slow down if there is a lot of logging IO
-
6. Re: Jboss7.x + Common Log file location + cluster mode
dj.ruoss Dec 12, 2013 6:19 AM (in response to wdfink)hi,
the scenario: 2 machines, 1 domain, 4 nodes (2xmachines): 1 LUN(SAN) attached via fiber channel cables to the machines and mounted on /project/applicationLogs/ i hope this kind of scenario will not encounter any issues....
What I meant was if you use slower filesystems like NFS, Samba ... in that case the IO might to slow and the applications slow down if there is a lot of logging IO
if you meant samba or nfs, so you was talking about IO performance... ok i am quite relieved.
thank you again....
-
7. Re: Jboss7.x + Common Log file location + cluster mode
wdfink Dec 13, 2013 9:22 AM (in response to dj.ruoss)Deejay Ruoss wrote:
if you meant samba or nfs, so you was talking about IO performance... ok i am quite relieved.
exactly
-
8. Re: Jboss7.x + Common Log file location + cluster mode
rhusar Dec 17, 2013 9:20 AM (in response to wdfink)I would still prefer using some distributed logging software, specifically designed for the task, or setup scheduled job to do that regularly.