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

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

问题描述

我有一个 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.

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

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