Skip to content

Commit 4a384b8

Browse files
committed
Added an error reporting and viewing system
viewing the reports is through the server manager (renamed docker controller --> server manager)
1 parent feb9061 commit 4a384b8

20 files changed

Lines changed: 762 additions & 251 deletions

File tree

docker_controller/src/main/kotlin/com/imsproject/docker_controller/App.kt

Lines changed: 0 additions & 176 deletions
This file was deleted.

docker_controller/src/main/resources/application.properties

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,25 @@
11
package com.imsproject.gameserver
22

3+
import org.slf4j.LoggerFactory
34
import org.springframework.boot.autoconfigure.SpringBootApplication
5+
import org.springframework.boot.context.event.ApplicationReadyEvent
46
import org.springframework.boot.runApplication
7+
import org.springframework.context.event.EventListener
58

69
@SpringBootApplication
7-
class GameServerApplication
10+
class GameServerApplication {
11+
@EventListener(ApplicationReadyEvent::class)
12+
fun setUncaughtExceptionHandler(event: ApplicationReadyEvent) {
13+
Thread.setDefaultUncaughtExceptionHandler { t, e ->
14+
log.error("Uncaught Exception in thread ${t.name}",e)
15+
}
16+
}
17+
18+
companion object {
19+
private val log = LoggerFactory.getLogger(GameServerApplication::class.java)
20+
}
21+
}
822

923
fun main(args: Array<String>) {
1024
runApplication<GameServerApplication>(*args)
11-
}
25+
}
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
<relativePath/> <!-- lookup parent from repository -->
1010
</parent>
1111
<groupId>com.imsproject</groupId>
12-
<artifactId>docker_controller</artifactId>
12+
<artifactId>server_manager</artifactId>
1313
<version>0.0.1-SNAPSHOT</version>
14-
<name>docker_controller</name>
15-
<description>docker_controller</description>
14+
<name>server_manager</name>
15+
<description>server_manager</description>
1616
<url/>
1717
<licenses>
1818
<license/>
@@ -47,11 +47,6 @@
4747
<groupId>org.springframework.boot</groupId>
4848
<artifactId>spring-boot-starter-security</artifactId>
4949
</dependency>
50-
<dependency>
51-
<groupId>com.google.code.gson</groupId>
52-
<artifactId>gson</artifactId>
53-
<version>2.11.0</version>
54-
</dependency>
5550
<dependency>
5651
<groupId>org.springframework.boot</groupId>
5752
<artifactId>spring-boot-starter-thymeleaf</artifactId>
@@ -60,6 +55,11 @@
6055
<groupId>org.thymeleaf.extras</groupId>
6156
<artifactId>thymeleaf-extras-springsecurity6</artifactId>
6257
</dependency>
58+
<dependency>
59+
<groupId>com.imsproject</groupId>
60+
<artifactId>common</artifactId>
61+
<version>1.0</version>
62+
</dependency>
6363
</dependencies>
6464

6565
<build>

0 commit comments

Comments
 (0)