psiprobe.tools.logging.log4j.Log4JLoggerAccessor Maven / Gradle / Ivy
/**
* Licensed under the GPL License. You may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
* THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
* WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE.
*/
package psiprobe.tools.logging.log4j;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Enumeration;
import java.util.List;
import org.apache.commons.lang3.reflect.MethodUtils;
import psiprobe.tools.logging.DefaultAccessor;
/**
* The Class Log4JLoggerAccessor.
*/
public class Log4JLoggerAccessor extends DefaultAccessor {
/** The context. */
private boolean context;
/**
* Gets the appenders.
*
* @return the appenders
*/
@SuppressWarnings("unchecked")
public List getAppenders() {
List appenders = new ArrayList<>();
try {
for (Object unwrappedAppender : Collections
.list((Enumeration