@Override protected void validateChange( ConfiguredObject<?> proxyForValidation, Set<String> changedAttributes) { super.validateChange(proxyForValidation, changedAttributes); VirtualHostFileLogger virtualHostFileLogger = (VirtualHostFileLogger) proxyForValidation; if (changedAttributes.contains(FILE_NAME) && (virtualHostFileLogger.getFileName() != null)) { AppenderUtils.validateLogFilePermissions(new File(virtualHostFileLogger.getFileName())); } if (changedAttributes.contains(MAX_FILE_SIZE)) { AppenderUtils.validateMaxFileSize(virtualHostFileLogger.getMaxFileSize()); } }
@Override protected Appender<ILoggingEvent> createAppenderInstance(Context loggerContext) { final RollingFileAppender<ILoggingEvent> appender = new RollingFileAppender<>(); AppenderUtils.configureRollingFileAppender(this, loggerContext, appender); return appender; }