Minor code householding
- Add removed property to migration service - Log exception with appropriate logger method
This commit is contained in:
parent
1cbd11a753
commit
38db2ef0bd
@ -46,7 +46,7 @@ public final class ConsoleLogger {
|
|||||||
try {
|
try {
|
||||||
fileWriter = new FileWriter(logFile, true);
|
fileWriter = new FileWriter(logFile, true);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
ConsoleLogger.showError("Failed to create the log file:" + e);
|
ConsoleLogger.logException("Failed to create the log file:", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -70,7 +70,7 @@ public final class ConsoleLogger {
|
|||||||
public static void debug(String message) {
|
public static void debug(String message) {
|
||||||
if (enableDebug) {
|
if (enableDebug) {
|
||||||
//creating and filling an exception is a expensive call
|
//creating and filling an exception is a expensive call
|
||||||
//->so it should be removed as soon #419 is fixed
|
//TODO #419 20160601: ->so it should be removed as soon #419 is fixed
|
||||||
//logger.isLoggable does not work because the plugin logger is always ALL
|
//logger.isLoggable does not work because the plugin logger is always ALL
|
||||||
logger.log(Level.FINE, message + ' ' + Thread.currentThread().getName(), new Exception());
|
logger.log(Level.FINE, message + ' ' + Thread.currentThread().getName(), new Exception());
|
||||||
|
|
||||||
|
|||||||
@ -43,9 +43,6 @@ import java.util.Collection;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import static fr.xephi.authme.permission.DefaultPermission.ALLOWED;
|
|
||||||
import static fr.xephi.authme.permission.DefaultPermission.OP_ONLY;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes all available AuthMe commands.
|
* Initializes all available AuthMe commands.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -64,7 +64,7 @@ public class SettingsMigrationService {
|
|||||||
String[] deprecatedProperties = {
|
String[] deprecatedProperties = {
|
||||||
"Converter.Rakamak.newPasswordHash", "Hooks.chestshop", "Hooks.legacyChestshop", "Hooks.notifications",
|
"Converter.Rakamak.newPasswordHash", "Hooks.chestshop", "Hooks.legacyChestshop", "Hooks.notifications",
|
||||||
"Passpartu", "Performances", "settings.restrictions.enablePasswordVerifier", "Xenoforo.predefinedSalt",
|
"Passpartu", "Performances", "settings.restrictions.enablePasswordVerifier", "Xenoforo.predefinedSalt",
|
||||||
"VeryGames"};
|
"VeryGames", "settings.restrictions.allowAllCommandsIfRegistrationIsOptional"};
|
||||||
for (String deprecatedPath : deprecatedProperties) {
|
for (String deprecatedPath : deprecatedProperties) {
|
||||||
if (configuration.contains(deprecatedPath)) {
|
if (configuration.contains(deprecatedPath)) {
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user