How to set jboss.server.log.dir in JBoss

 

Wednesday, June 22, 2011

How to set jboss.server.log.dir in JBoss

Go to >> Java Tutorials

Target audience: Beginners
Version: JBoss 4.2.x

By Default, JBoss writes the server log files to /jboss-4.2.0.GA/server/default/log location. We can change this location by specifying a system parameter jboss.server.log.dir .

For Example, if you want JBoss to write the server log file to “ C:/Logs/JBoss/myapp”, then what you should do is to set a system property as this -Djboss.server.log.dir=C:/Logs/JBoss/myapp

As this property is used during bootstrap, this should be set when JVM starts. To do this, open “ run.bat” file and set bellow entry. Remember to keep a space in front of %JAVA_OPTS%

set JAVA_OPTS=-Djboss.server.log.dir=C:/Logs/JBoss/myapp %JAVA_OPTS%

After setting this, start the JBoss server. you would see the log files would be created under “ C:/Logs/JBoss/myapp

In the same way, you can set some other JBoss properties too. Some are given bellow

jboss.home.dir - The base directory of the jboss distribution - default: $JBOSS_HOME
jboss.home.url - The base url of the jboss distribution - default $JBOSS_HOME
jboss.lib.url - The url where the kernel jars exist - default: $jboss.home.url/lib
jboss.patch.url - A directory where patch jars exist - default: none
jboss.server.name - The configuration name of the server - default: default
jboss.server.base.dir - The directory where server configurations exist - default: $jboss.home.dir/server
jboss.server.base.url - The url where server configurations exist - default: $jboss.home.url/server
jboss.server.home.dir - The directory for the current configuration - default: $jboss.server.base.dir/$jboss.server.name
jboss.server.home.url - The url for the current configuration - default: $jboss.server.base.url/$jboss.server.name
jboss.server.temp.dir - The directory for temporary files - default: $jboss.server.home.dir/tmp
jboss.server.data.dir - The directory for data files - default: $jboss.server.home.dir/data
jboss.server.config.url - The url for configuration files - default: $jboss.server.home.url/conf
jboss.server.lib.url - The url for static jar files - default: $jboss.server.home.url/lib
jboss.server.log.dir - The directory where the server logs are written - default: $jboss.server.home.dir/log

Hope this is helpful for you.
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值