    001    package net.minecraft.src;
    002
    003    import java.util.logging.ConsoleHandler;
    004    import java.util.logging.FileHandler;
    005    import java.util.logging.Level;
    006    import java.util.logging.Logger;
    007
    008    import cpw.mods.fml.common.FMLLog;
    009
    010    public class ConsoleLogManager
    011    {
    012        /** Log manager of Minecraft. */
    013        public static Logger loggerLogManager = Logger.getLogger("Minecraft");
    014
    015        /**
    016         * Initialises the console logger.
    017         */
    018        public static void init()
    019        {
    020            ConsoleLogFormatter var0 = new ConsoleLogFormatter();
    021            loggerLogManager.setParent(FMLLog.getLogger());
    022
    023            try
    024            {
    025                FileHandler var2 = new FileHandler("server.log", true);
    026                var2.setFormatter(var0);
    027                loggerLogManager.addHandler(var2);
    028            }
    029            catch (Exception var3)
    030            {
    031                loggerLogManager.log(Level.WARNING, "Failed to log to server.log", var3);
    032            }
    033        }
    034    }