/**
* Internal implementation for logging. Does not allow Exceptions to propagate outside the logging functionality.
*/
private void doLog(final Admin admin, final int caid, final int module, final Date time, final String username, final Certificate certificate, final int event, final String comment, final Exception ex) {
final LogConfiguration config = logConfigurationSession.loadLogConfiguration(caid);
final Iterator<ILogDevice> i = logdevices.iterator();
while (i.hasNext()) {
final ILogDevice dev = i.next();
try {
if (!dev.getAllowConfigurableEvents() || config.logEvent(event)) {
dev.log(admin, caid, module, time, username, certificate, event, comment, ex);
}
} catch (Throwable e) { // NOPMD, we really want to catch every possible error from the log device
LOG.error(INTRES.getLocalizedMessage("log.error.logdropped",admin.getAdminType()+" "+admin.getAdminData()+" "
+caid+" "+" "+module+" "+" "+time+" "+username+" "+(certificate==null?"null":CertTools.getSerialNumberAsString(certificate)+" "