From 51c6451b36e8f3845ba278d42e7c4a9941556986 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sun, 7 Apr 2019 12:44:08 +0200 Subject: Added better logging --- src/main/kotlin/DatabaseController.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/main/kotlin/DatabaseController.kt') diff --git a/src/main/kotlin/DatabaseController.kt b/src/main/kotlin/DatabaseController.kt index 64acc6c..32e33ef 100644 --- a/src/main/kotlin/DatabaseController.kt +++ b/src/main/kotlin/DatabaseController.kt @@ -3,9 +3,11 @@ package space.anity import org.jetbrains.exposed.sql.* import org.jetbrains.exposed.sql.transactions.* import java.sql.* +import java.util.logging.* class DatabaseController(dbFileLocation: String = "main.db") { val db: Database + val LOG = Logger.getLogger(this.javaClass.name) /** * Database table for the file location indexing @@ -53,7 +55,7 @@ class DatabaseController(dbFileLocation: String = "main.db") { it[role] = roleString } } catch (_: org.jetbrains.exposed.exceptions.ExposedSQLException) { - println("User already exists") + LOG.warning("User already exists!") } } -- cgit v1.2.3