diff options
Diffstat (limited to 'src/main/java/com/mavlonerkinboev/animarfo/App.java')
-rw-r--r-- | src/main/java/com/mavlonerkinboev/animarfo/App.java | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/src/main/java/com/mavlonerkinboev/animarfo/App.java b/src/main/java/com/mavlonerkinboev/animarfo/App.java deleted file mode 100644 index e35ac03..0000000 --- a/src/main/java/com/mavlonerkinboev/animarfo/App.java +++ /dev/null @@ -1,41 +0,0 @@ -package com.mavlonerkinboev.animarfo; - -import com.mavlonerkinboev.animarfo.telegram.bot.Bot; - -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.util.Properties; -import java.util.logging.Level; -import java.util.logging.LogManager; -import java.util.logging.Logger; - -public class App { - public final static Properties PROPERTIES = loadProperties(new File("src/main/resources/app.properties")); - private static final Logger LOGGER = Logger.getLogger(App.class.getName()); - - static { - try { - FileInputStream ins = new FileInputStream("log.config"); - LogManager.getLogManager().readConfiguration(ins); - LOGGER.setLevel(Level.ALL); - } catch (IOException e) { - e.printStackTrace(); - } - } - - public static void main(String[] args) { - LOGGER.info("Trying to start bot"); - Bot.start(); - } - - public static Properties loadProperties(File file) { - Properties properties = new Properties(); - try (FileInputStream fis = new FileInputStream(file)) { - properties.load(fis); - } catch (IOException e) { - e.printStackTrace(); - } - return properties; - } -} |