本文介绍了您如何指定外部log4j属性文件来启动jboss服务器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何指定外部log4j属性文件运行jboss服务器?
How do you specify an external log4j properties file to run a jboss server with?
我需要使用bash/terminal命令来执行此操作吗?不是以编程方式
I need to do this with bash/ terminal commands? Not programmatically
推荐答案
创建一个文件夹来存储log4j.properties
(即C:\PropertiesFolder
).
然后将指向该文件夹的链接添加到JBoss classpath:
Create a folder to store log4j.properties
(i.e C:\PropertiesFolder
).
Then add the link to this folder to JBoss classpath:
- 转到
[server folder]\bin
- 编辑
run.bat
(如果服务器在Windows上运行)或run.sh
(对于Linux) - 通过添加文件夹链接来编辑类路径行:
- Go to
[server folder]\bin
- Edit
run.bat
(if server is running on Windows) orrun.sh
(for Linux) - Edit classpath line by adding the folder link:
摘要:
if "x%JBOSS_CLASSPATH%" == "x" (
set "RUN_CLASSPATH=%RUNJAR%;C:\PropertiesFolder;"
) else (
set "RUN_CLASSPATH=%JBOSS_CLASSPATH%;%RUNJAR%;C:\PropertiesFolder;"
)
最后重新启动服务器,然后通过命令行运行(转到[server folder]\bin
然后键入run
)
Finally restart the server then run by command line (go to [server folder]\bin
then type run
)
这篇关于您如何指定外部log4j属性文件来启动jboss服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!