Added basic logger
This commit is contained in:
1 parent
b577f10c2f
commit
6a787b739e
2 files changed
+17
No files matched your search
@@ -16,10 +16,13 @@ import netneutrality.handler.LogHandler;
|
||||
import netneutrality.handler.NewCommandListener;
|
||||
import netneutrality.http.server.WebApi;
|
||||
import netneutrality.utils.Settings;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class MusicBot {
|
||||
|
||||
private static JDA jda;
|
||||
public static Logger LOGGER = LoggerFactory.getLogger(NewCommandListener.class);
|
||||
|
||||
public static void main(String[] args) {
|
||||
DBController.init();
|
||||
@@ -27,6 +30,7 @@ public class MusicBot {
|
||||
try {
|
||||
jda = new JDABuilder(AccountType.BOT).setToken(token).buildBlocking();
|
||||
} catch (LoginException | IllegalArgumentException | InterruptedException e) {
|
||||
LOGGER.error(e.getMessage());
|
||||
LogHandler.log(e);
|
||||
}
|
||||
jda.getPresence().setGame(Game.watching("me load..."));
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Configuration status="WARN">
|
||||
<Appenders>
|
||||
<Console name="Console" target="SYSTEM_OUT">
|
||||
<PatternLayout pattern="%d{HH:mm:ss.SSS} %-5level %logger{36} - %msg%n" />
|
||||
</Console>
|
||||
</Appenders>
|
||||
<Loggers>
|
||||
<Root level="debug">
|
||||
<AppenderRef ref="Console" />
|
||||
</Root>
|
||||
</Loggers>
|
||||
</Configuration>
|
||||
Reference in new issue
Block a user