* #1874 Introduce individual ConsoleLogger instance per class - Create ConsoleLoggerFactory from which a separate logger can be created for each class - Allows to support individual log level settings in the future * Fix CodeStyle issue * Replace full class name with import * Update usages after merge from master
This commit is contained in:
@@ -4,6 +4,7 @@ import fr.xephi.authme.ConsoleLogger;
|
||||
import fr.xephi.authme.datasource.DataSource;
|
||||
import fr.xephi.authme.initialization.HasCleanup;
|
||||
import fr.xephi.authme.initialization.Reloadable;
|
||||
import fr.xephi.authme.output.ConsoleLoggerFactory;
|
||||
import fr.xephi.authme.mail.EmailService;
|
||||
import fr.xephi.authme.message.MessageKey;
|
||||
import fr.xephi.authme.message.Messages;
|
||||
@@ -27,6 +28,8 @@ import static fr.xephi.authme.settings.properties.EmailSettings.RECOVERY_PASSWOR
|
||||
* Manager for password recovery.
|
||||
*/
|
||||
public class PasswordRecoveryService implements Reloadable, HasCleanup {
|
||||
|
||||
private final ConsoleLogger logger = ConsoleLoggerFactory.get(PasswordRecoveryService.class);
|
||||
|
||||
@Inject
|
||||
private CommonService commonService;
|
||||
@@ -95,7 +98,7 @@ public class PasswordRecoveryService implements Reloadable, HasCleanup {
|
||||
String thePass = RandomStringUtils.generate(commonService.getProperty(RECOVERY_PASSWORD_LENGTH));
|
||||
HashedPassword hashNew = passwordSecurity.computeHash(thePass, name);
|
||||
|
||||
ConsoleLogger.info("Generating new password for '" + name + "'");
|
||||
logger.info("Generating new password for '" + name + "'");
|
||||
|
||||
dataSource.updatePassword(name, hashNew);
|
||||
boolean couldSendMail = emailService.sendPasswordMail(name, email, thePass);
|
||||
|
||||
Reference in New Issue
Block a user