[ColdBox-4.1.0] LogBox logging only under specific conditions

I want to create log entries only for specific events and under specific conditions. If I create an appender:

logBox.appenders[“dbLog”] = {
class = “coldbox.system.logging.appenders.DBAppender”,
properties = {
dsn = “db”,
table = “mylog”,
autocreate = true,
textDBType = “VARCHAR(max)”,
async = true
}
};

and then in my handler I inject the logger:
property name=“dbLogger” inject=“logBox:logger:mycat”;

and here’s the conditional logging:
dbLogger.info(message = “blah”, extraInfo = extraInfo);

The logging does work, but I also get a lot of other unwanted loggings coming from the system, with categories like “coldbox.system.ioc.Injector”, “coldbox.system.ioc.Builder”, etc. How do I avoid that?

The default in a coldbox app is a root logged with appenders = "*". That means any logger you make will apply. Use a list of appenders instead for the root logger and add your new appender only to your desired category.

https://logbox.ortusbooks.com/configuration/configuring-logbox/logbox-dsl

Hmm… so I have to explicitly define a list of appenders for root logger? Where can I get the existing list?

It’s all the loggers under the appenders key.