SBT/Scala项目中logback.xml应该位于哪个项目目录? [英] What project directory should logback.xml be in SBT/Scala project?

查看:210
本文介绍了SBT/Scala项目中logback.xml应该位于哪个项目目录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个SBT/Scala项目,logback似乎可以正常工作,但完全忽略了我的logback.xml配置文件.我已放置在src/main/scala/logback.xml.它什么也没做.

I have an SBT/Scala project and logback seems to work, but totally ignores my logback.xml config file. I have placed at src/main/scala/logback.xml. It doesn't do anything.

正确的位置是什么?

有人可以发布带有有效logback.xml文件的SBT/Scala骨架项目的示例吗?

Can anybody post an example of an SBT/Scala skeleton project with a working logback.xml file?

推荐答案

将其放在src/main/resources/logback.xml下.当SBT执行工件组装时,它将被复制到正确的位置.

Put it under src/main/resources/logback.xml. It will be copied to the right location when SBT is doing the artifact assembly.

这篇关于SBT/Scala项目中logback.xml应该位于哪个项目目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆