简体   繁体   English

如何使第三方应用程序使用logback.xml?

[英]How to make 3rd party application use logback.xml?

I am working on a plugin for a Java application. 我正在为Java应用程序开发插件。 This Java application does not use a real logger, however my plugin uses logback. 该Java应用程序未使用真正的记录器,但是我的插件使用了logback。 When the end-user runs the application on Windows, he will run an .EXE file which somehow starts the application using several jars. 当最终用户在Windows上运行该应用程序时,他将运行一个.EXE文件,该文件将使用多个jar以某种方式启动该应用程序。

Now my problem is, that I don't know how to tell my plugin to find the logback.xml as I don't know what the classpath is set to and how I can modify it to include a path wher I put my logback.xml 现在我的问题是,我不知道如何告诉我的插件找到logback.xml,因为我不知道将classpath设置为什么,以及如何修改它以包含放置logback的路径。 XML文件

Try to put it into your jar (a plugin you did). 尝试将其放入您的jar(您做过的插件)中。 Most likely you will end up with a solution from logback.xml and running application from JetBrains IDEA IDE . 您很可能最终将获得logback.xml中的解决方案以及JetBrains IDEA IDE中运行的应用程序

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM