removed info call from sendInfo method in CustomLogger class

2.x-1.16 2.0.0
szymon 2020-08-15 21:59:11 +02:00
parent b24c807a3a
commit 5de9c9ba0c
4 changed files with 7 additions and 5 deletions

View File

@ -87,10 +87,11 @@ public class TextileBackup implements ModInitializer {
return true; return true;
} }
} }
).then(BlacklistCommand.register()) )
.then(CleanupCommand.register())
.then(StartBackupCommand.register()) .then(StartBackupCommand.register())
.then(CleanupCommand.register())
.then(WhitelistCommand.register()) .then(WhitelistCommand.register())
.then(BlacklistCommand.register())
.then(RestoreBackupCommand.register()) .then(RestoreBackupCommand.register())
.then(ListBackupsCommand.register()) .then(ListBackupsCommand.register())
.then(KillRestoreCommand.register()) .then(KillRestoreCommand.register())

View File

@ -113,7 +113,6 @@ public class CustomLogger {
public void sendInfo(ServerCommandSource source, String msg, Object... args) { public void sendInfo(ServerCommandSource source, String msg, Object... args) {
sendToPlayer(Level.INFO, source, msg, args); sendToPlayer(Level.INFO, source, msg, args);
info(msg, args);
} }
public void sendError(ServerCommandSource source, String msg, Object... args) { public void sendError(ServerCommandSource source, String msg, Object... args) {

View File

@ -52,6 +52,7 @@ public class BackupHelper {
if (ctx.shouldSave()) { if (ctx.shouldSave()) {
Statics.LOGGER.sendInfo(ctx.getCommandSource(), "Saving server..."); Statics.LOGGER.sendInfo(ctx.getCommandSource(), "Saving server...");
Statics.LOGGER.info( "Saving server...");
ctx.getServer().save(true, true, false); ctx.getServer().save(true, true, false);
} }
@ -111,6 +112,7 @@ public class BackupHelper {
if(f != Statics.untouchableFile) { if(f != Statics.untouchableFile) {
if(f.delete()) { if(f.delete()) {
Statics.LOGGER.sendInfo(ctx, "Deleting: {}", f.getName()); Statics.LOGGER.sendInfo(ctx, "Deleting: {}", f.getName());
Statics.LOGGER.info("Deleting: {}", f.getName());
return true; return true;
} else { } else {
Statics.LOGGER.sendError(ctx, "Something went wrong while deleting: {}.", f.getName()); Statics.LOGGER.sendError(ctx, "Something went wrong while deleting: {}.", f.getName());
@ -119,6 +121,4 @@ public class BackupHelper {
return false; return false;
} }
private static boolean isFileOk(File f) {return f.exists() && f.isFile(); }
} }

View File

@ -36,6 +36,7 @@ public class MakeBackupRunnable implements Runnable {
@Override @Override
public void run() { public void run() {
Statics.LOGGER.sendInfo(context.getCommandSource(), "Starting backup"); Statics.LOGGER.sendInfo(context.getCommandSource(), "Starting backup");
Statics.LOGGER.info("Starting backup");
File world = Utilities.getWorldFolder(context.getServer()); File world = Utilities.getWorldFolder(context.getServer());
@ -98,6 +99,7 @@ public class MakeBackupRunnable implements Runnable {
BackupHelper.executeFileLimit(context.getCommandSource(), Utilities.getLevelName(context.getServer())); BackupHelper.executeFileLimit(context.getCommandSource(), Utilities.getLevelName(context.getServer()));
Statics.LOGGER.sendInfo(context, "Done!"); Statics.LOGGER.sendInfo(context, "Done!");
Statics.LOGGER.info("Done!");
} }
private String getFileName(){ private String getFileName(){