如何通过排除子包来配置logback?

How to configure logback by excluding sub package?

我有像beow这样的包装结构

套餐

com.service.main
com.service.validation
com.service.subscriber
com.data.a
com.data.b
com.data.c

我想创建 3 个 appender 一个用于所有数据。* 一项服务。*(订户除外) 一劳永逸service.subscriber

我这里不能用root

只需为此包添加单独的记录器并设置可加性标志。
Documentation.

将触发更具体的记录器。其他记录器将忽略这个包,因为你有更具体的(并且关闭 "additivity")。