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?