Made console change text color depending on messages
This commit is contained in:
parent
16a90f3240
commit
1d5ac77255
4 changed files with 14 additions and 1 deletions
|
|
@ -70,14 +70,18 @@ namespace TShockAPI
|
|||
Tools.Broadcast("Server map saving, potential lag spike");
|
||||
WorldGen.saveWorld();
|
||||
|
||||
Console.ForegroundColor = ConsoleColor.Yellow;
|
||||
Console.WriteLine("World backed up");
|
||||
Console.ForegroundColor = ConsoleColor.Gray;
|
||||
Log.Info(string.Format("World backed up ({0})", Main.worldPathName));
|
||||
|
||||
Main.worldPathName = worldname;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.ForegroundColor = ConsoleColor.Red;
|
||||
Console.WriteLine("Backup failed");
|
||||
Console.ForegroundColor = ConsoleColor.Gray;
|
||||
Log.Error("Backup failed");
|
||||
Log.Error(ex.ToString());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue