PageRenderTime 807ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 0ms

/moCreatures/server/core/sources/net/minecraft/src/ConsoleLogManager.java

https://code.google.com/p/minecraft-smp-mocreatures/
Java | 41 lines | 28 code | 8 blank | 5 comment | 0 complexity | f0ad077b0536d0cf4aaa3d0664f13bac MD5 | raw file
  1. // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
  2. // Jad home page: http://www.kpdus.com/jad.html
  3. // Decompiler options: packimports(3) braces deadcode
  4. package net.minecraft.src;
  5. import java.io.IOException;
  6. import java.util.logging.*;
  7. // Referenced classes of package net.minecraft.src:
  8. // ConsoleLogFormatter
  9. public class ConsoleLogManager
  10. {
  11. public ConsoleLogManager()
  12. {
  13. }
  14. public static void init()
  15. {
  16. ConsoleLogFormatter consolelogformatter = new ConsoleLogFormatter();
  17. logger.setUseParentHandlers(false);
  18. ConsoleHandler consolehandler = new ConsoleHandler();
  19. consolehandler.setFormatter(consolelogformatter);
  20. logger.addHandler(consolehandler);
  21. try
  22. {
  23. FileHandler filehandler = new FileHandler("server.log", true);
  24. filehandler.setFormatter(consolelogformatter);
  25. logger.addHandler(filehandler);
  26. }
  27. catch(Exception exception)
  28. {
  29. logger.log(Level.WARNING, "Failed to log to server.log", exception);
  30. }
  31. }
  32. public static Logger logger = Logger.getLogger("Minecraft");
  33. }