public static List < ILoggingEvent > capture ( Logger logger ) { CaptureAppender capture = new CaptureAppender ( ) ; ( ( ch . qos . logback . classic . Logger ) logger ) . addAppender ( capture ) ; capture . start ( ) ; return capture . captured ; }
Capture a Logger .