From 09c8465fe33ed56399c85ebae31b5755e90c8664 Mon Sep 17 00:00:00 2001 From: NikkyAI Date: Sun, 11 Feb 2018 21:23:54 +0100 Subject: [PATCH] remove unecessary Enum --- .../src/main/kotlin/matterlink/IMatterLink.kt | 12 +++--- core/src/main/kotlin/matterlink/Level.kt | 38 ------------------- 2 files changed, 6 insertions(+), 44 deletions(-) delete mode 100644 core/src/main/kotlin/matterlink/Level.kt diff --git a/core/src/main/kotlin/matterlink/IMatterLink.kt b/core/src/main/kotlin/matterlink/IMatterLink.kt index 8371c78..d35755f 100644 --- a/core/src/main/kotlin/matterlink/IMatterLink.kt +++ b/core/src/main/kotlin/matterlink/IMatterLink.kt @@ -21,11 +21,11 @@ abstract class IMatterLink { abstract fun log(level: String, formatString: String, vararg data: Any) - fun fatal(formatString: String, vararg data: Any) = log(Level.FATAL.name, formatString, *data) - fun error(formatString: String, vararg data: Any) = log(Level.ERROR.name, formatString, *data) - fun warn(formatString: String, vararg data: Any) = log(Level.WARN.name, formatString, *data) - fun info(formatString: String, vararg data: Any) = log(Level.INFO.name, formatString, *data) - fun debug(formatString: String, vararg data: Any) = log(Level.DEBUG.name, formatString, *data) - fun trace(formatString: String, vararg data: Any) = log(Level.TRACE.name, formatString, *data) + fun fatal(formatString: String, vararg data: Any) = log("^FATAL", formatString, *data) + fun error(formatString: String, vararg data: Any) = log("ERROR", formatString, *data) + fun warn(formatString: String, vararg data: Any) = log("WARN", formatString, *data) + fun info(formatString: String, vararg data: Any) = log("INFO", formatString, *data) + fun debug(formatString: String, vararg data: Any) = log("DEBUG", formatString, *data) + fun trace(formatString: String, vararg data: Any) = log("TRACE", formatString, *data) } \ No newline at end of file diff --git a/core/src/main/kotlin/matterlink/Level.kt b/core/src/main/kotlin/matterlink/Level.kt deleted file mode 100644 index 3675aa6..0000000 --- a/core/src/main/kotlin/matterlink/Level.kt +++ /dev/null @@ -1,38 +0,0 @@ -package matterlink - -enum class Level(val level: Int) { - /** - * No events will be logged. - */ - OFF(0), - - /** - * A severe error that will prevent the application from continuing. - */ - FATAL(1), - - /** - * An error in the application, possibly recoverable. - */ - ERROR(2), - - /** - * An event that might possible lead to an error. - */ - WARN(3), - - /** - * An event for informational purposes. - */ - INFO(4), - - /** - * A general debugging event. - */ - DEBUG(5), - - /** - * A fine-grained debug message, typically capturing the flow through the application. - */ - TRACE(6), -} \ No newline at end of file