updated to log4j2
This commit is contained in:
@ -2,7 +2,9 @@ package de.muehlencord.shared.util;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.text.ParseException;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.Level;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -11,7 +13,7 @@ import org.apache.log4j.Logger;
|
||||
public abstract class StringUtil {
|
||||
|
||||
/** the logging object */
|
||||
private static final Logger LOGGER = Logger.getLogger(StringUtil.class);
|
||||
private static final Logger LOGGER = LogManager.getLogger(StringUtil.class);
|
||||
|
||||
/**
|
||||
* returns the given string in ISO-8859-1 encoding
|
||||
@ -26,7 +28,7 @@ public abstract class StringUtil {
|
||||
byte[] b = input.getBytes("UTF-8");
|
||||
return new String(b, "ISO-8859-1");
|
||||
} catch (UnsupportedEncodingException ex) {
|
||||
LOGGER.debug(getStackTraceString(ex));
|
||||
LOGGER.log (Level.DEBUG, ex.toString(), ex);
|
||||
throw new StringEncodingException("Cannot convert string from UTF-8 to ISO-8859-1. Reason: " + ex.getMessage(), ex);
|
||||
}
|
||||
}
|
||||
|
||||
@ -19,7 +19,8 @@ import java.text.Format;
|
||||
import static java.util.Arrays.asList;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -30,7 +31,7 @@ public abstract class FileUtil {
|
||||
/**
|
||||
* the logging object
|
||||
*/
|
||||
private static final Logger LOGGER = Logger.getLogger(FileUtil.class);
|
||||
private static final Logger LOGGER = LogManager.getLogger(FileUtil.class);
|
||||
|
||||
/**
|
||||
* returns a list of files found by the given regexp in the given folder
|
||||
|
||||
Reference in New Issue
Block a user