From 1296b321105bf8ef1bbbd11bede844e2544d462a Mon Sep 17 00:00:00 2001 From: bdew Date: Mon, 17 Feb 2014 12:25:14 +0200 Subject: [PATCH] Added log object, fixed missing annotation, fixed copyright headers --- src/net/bdew/lib/BdLib.scala | 12 +++++++++++- src/net/bdew/lib/gui/widgets/WidgetButton.scala | 6 +++--- src/net/bdew/lib/gui/widgets/WidgetDynLabel.scala | 4 ++-- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/net/bdew/lib/BdLib.scala b/src/net/bdew/lib/BdLib.scala index c186165..9b54cf7 100644 --- a/src/net/bdew/lib/BdLib.scala +++ b/src/net/bdew/lib/BdLib.scala @@ -11,10 +11,20 @@ package net.bdew.lib import cpw.mods.fml.common.Mod import cpw.mods.fml.common.event.FMLPreInitializationEvent +import java.util.logging.Logger +import cpw.mods.fml.common.Mod.EventHandler @Mod(modid = "bdlib", name = "BD lib", version = "BDLIB_VER", modLanguage = "scala") object BdLib { + var log: Logger = null + + def logInfo(msg: String, args: Any*) = log.info(msg.format(args: _*)) + def logWarn(msg: String, args: Any*) = log.warning(msg.format(args: _*)) + def logError(msg: String, args: Any*) = log.severe(msg.format(args: _*)) + + @EventHandler def preInit(ev: FMLPreInitializationEvent) { - ev.getModLog.info("bdlib BDLIB_VER loaded") + log = ev.getModLog + log.info("bdlib BDLIB_VER loaded") } } diff --git a/src/net/bdew/lib/gui/widgets/WidgetButton.scala b/src/net/bdew/lib/gui/widgets/WidgetButton.scala index 94e2d49..a665ce8 100644 --- a/src/net/bdew/lib/gui/widgets/WidgetButton.scala +++ b/src/net/bdew/lib/gui/widgets/WidgetButton.scala @@ -1,10 +1,10 @@ /* - * Copyright (c) bdew, 2014 - * https://github.com/bdew/teleporter + * Copyright (c) bdew, 2013 - 2014 + * https://github.com/bdew/bdlib * * This mod is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in - * https://raw.github.com/bdew/teleporter/master/MMPL-1.0.txt + * https://raw.github.com/bdew/bdlib/master/MMPL-1.0.txt */ package net.bdew.lib.gui.widgets diff --git a/src/net/bdew/lib/gui/widgets/WidgetDynLabel.scala b/src/net/bdew/lib/gui/widgets/WidgetDynLabel.scala index 3e2aa17..475a7b8 100644 --- a/src/net/bdew/lib/gui/widgets/WidgetDynLabel.scala +++ b/src/net/bdew/lib/gui/widgets/WidgetDynLabel.scala @@ -1,10 +1,10 @@ /* * Copyright (c) bdew, 2013 - 2014 - * https://github.com/bdew/deepcore + * https://github.com/bdew/bdlib * * This mod is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in - * https://raw.github.com/bdew/deepcore/master/MMPL-1.0.txt + * https://raw.github.com/bdew/bdlib/master/MMPL-1.0.txt */ package net.bdew.lib.gui.widgets