Code cleanup: spacing

This commit is contained in:
Rick Falkvinge
2014-12-05 22:12:51 +01:00
parent c2d3a5edb4
commit bfdd5d8a53
412 changed files with 9095 additions and 9037 deletions
+7 -7
View File
@@ -6,7 +6,7 @@ namespace Swarmops.Utility.BotCode
{
public class BotLog
{
public static void Write(int generation, string code, string message)
public static void Write (int generation, string code, string message)
{
string line = string.Empty;
@@ -20,23 +20,23 @@ namespace Swarmops.Utility.BotCode
line += " ";
}
line += string.Format("{0,-16} ", code);
line += string.Format ("{0,-16} ", code);
line += message;
LogWrite(line);
LogWrite (line);
}
private static void LogWrite(string message)
private static void LogWrite (string message)
{
DateTime now = DateTime.Now;
string logFileName = "/var/log/swarmops/backend-log-" +
now.ToString("yyyy-MM-dd-HH") + ".log";
now.ToString ("yyyy-MM-dd-HH") + ".log";
using (StreamWriter writer = new StreamWriter(logFileName, true, Encoding.GetEncoding(1252)))
using (StreamWriter writer = new StreamWriter (logFileName, true, Encoding.GetEncoding (1252)))
{
writer.WriteLine("[" + now.ToString("HH:mm:ss.fff") + "] " + message);
writer.WriteLine ("[" + now.ToString ("HH:mm:ss.fff") + "] " + message);
}
}
}