fix logger methods again, lol

This commit is contained in:
D3v1s0m 2023-10-17 15:41:11 +05:30
parent 9cb51d276e
commit c423793fc8
No known key found for this signature in database
GPG Key ID: FA1F770C7B1D40C1

@ -5,7 +5,6 @@ import lol.pyr.znpcsplus.storage.database.Database;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.sql.*; import java.sql.*;
import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
public class SQLite extends Database{ public class SQLite extends Database{
@ -20,7 +19,7 @@ public class SQLite extends Database{
try { try {
dbFile.createNewFile(); dbFile.createNewFile();
} catch (IOException e) { } catch (IOException e) {
logger.log(Level.SEVERE, "File write error: "+dbFile.getName()); logger.severe("File write error: "+dbFile.getName());
} }
} }
try { try {
@ -31,9 +30,9 @@ public class SQLite extends Database{
connection = DriverManager.getConnection("jdbc:sqlite:" + dbFile.getAbsolutePath()); connection = DriverManager.getConnection("jdbc:sqlite:" + dbFile.getAbsolutePath());
return connection; return connection;
} catch (SQLException ex) { } catch (SQLException ex) {
logger.log(Level.SEVERE,"SQLite exception on initialize", ex); logger.severe("SQLite exception on initialize" + ex);
} catch (ClassNotFoundException ex) { } catch (ClassNotFoundException ex) {
logger.log(Level.SEVERE, "SQLite JDBC library not found", ex); logger.severe("SQLite JDBC library not found" + ex);
} }
return null; return null;
} }