public void setAppender ( final Appender appender ) { if ( this . appender != null ) { close ( ) ; } checkAccess ( this ) ; if ( applyLayout && appender != null ) { final Formatter formatter = getFormatter ( ) ; appender . setLayout ( formatter == null ? null : new FormatterLayout ( formatter ) ) ; } appenderUpdater . set ( this , appender ) ; }
Set the Log4j appender .