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.handler.NewCommandListener;
|
||||||
import netneutrality.http.server.WebApi;
|
import netneutrality.http.server.WebApi;
|
||||||
import netneutrality.utils.Settings;
|
import netneutrality.utils.Settings;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
public class MusicBot {
|
public class MusicBot {
|
||||||
|
|
||||||
private static JDA jda;
|
private static JDA jda;
|
||||||
|
public static Logger LOGGER = LoggerFactory.getLogger(NewCommandListener.class);
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
DBController.init();
|
DBController.init();
|
||||||
@@ -27,6 +30,7 @@ public class MusicBot {
|
|||||||
try {
|
try {
|
||||||
jda = new JDABuilder(AccountType.BOT).setToken(token).buildBlocking();
|
jda = new JDABuilder(AccountType.BOT).setToken(token).buildBlocking();
|
||||||
} catch (LoginException | IllegalArgumentException | InterruptedException e) {
|
} catch (LoginException | IllegalArgumentException | InterruptedException e) {
|
||||||
|
LOGGER.error(e.getMessage());
|
||||||
LogHandler.log(e);
|
LogHandler.log(e);
|
||||||
}
|
}
|
||||||
jda.getPresence().setGame(Game.watching("me load..."));
|
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