#605 Logger - name methods after their log level
- Remove separate print stacktrace method - Log level into the log similar to console output
This commit is contained in:
@@ -34,14 +34,14 @@ public final class MigrationService {
|
||||
public static void changePlainTextToSha256(NewSetting settings, DataSource dataSource,
|
||||
SHA256 authmeSha256) {
|
||||
if (HashAlgorithm.PLAINTEXT == settings.getProperty(SecuritySettings.PASSWORD_HASH)) {
|
||||
ConsoleLogger.showError("Your HashAlgorithm has been detected as plaintext and is now deprecated;"
|
||||
ConsoleLogger.warning("Your HashAlgorithm has been detected as plaintext and is now deprecated;"
|
||||
+ " it will be changed and hashed now to the AuthMe default hashing method");
|
||||
ConsoleLogger.showError("Don't stop your server; wait for the conversion to have been completed!");
|
||||
ConsoleLogger.warning("Don't stop your server; wait for the conversion to have been completed!");
|
||||
List<PlayerAuth> allAuths = dataSource.getAllAuths();
|
||||
for (PlayerAuth auth : allAuths) {
|
||||
String hash = auth.getPassword().getHash();
|
||||
if (hash.startsWith("$SHA$")) {
|
||||
ConsoleLogger.showError("Skipping conversion for " + auth.getNickname() + "; detected SHA hash");
|
||||
ConsoleLogger.warning("Skipping conversion for " + auth.getNickname() + "; detected SHA hash");
|
||||
} else {
|
||||
HashedPassword hashedPassword = authmeSha256.computeHash(hash, auth.getNickname());
|
||||
auth.setPassword(hashedPassword);
|
||||
@@ -63,7 +63,7 @@ public final class MigrationService {
|
||||
*/
|
||||
public static DataSource convertFlatfileToSqlite(NewSetting settings, DataSource dataSource) {
|
||||
if (DataSourceType.FILE == settings.getProperty(DatabaseSettings.BACKEND)) {
|
||||
ConsoleLogger.showError("FlatFile backend has been detected and is now deprecated; it will be changed "
|
||||
ConsoleLogger.warning("FlatFile backend has been detected and is now deprecated; it will be changed "
|
||||
+ "to SQLite... Connection will be impossible until conversion is done!");
|
||||
FlatFile flatFile = (FlatFile) dataSource;
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user