summaryrefslogtreecommitdiff
path: root/simulator
diff options
context:
space:
mode:
Diffstat (limited to 'simulator')
-rw-r--r--simulator/opendc-runner-web/build.gradle.kts4
-rw-r--r--simulator/opendc-runner-web/src/main/kotlin/org/opendc/runner/web/Main.kt2
-rw-r--r--simulator/opendc-runner-web/src/main/resources/log4j2.xml11
3 files changed, 11 insertions, 6 deletions
diff --git a/simulator/opendc-runner-web/build.gradle.kts b/simulator/opendc-runner-web/build.gradle.kts
index a46e430f..7ae3c641 100644
--- a/simulator/opendc-runner-web/build.gradle.kts
+++ b/simulator/opendc-runner-web/build.gradle.kts
@@ -29,7 +29,7 @@ plugins {
}
application {
- mainClassName = "org.opendc.runner.web.MainKt"
+ mainClass.set("org.opendc.runner.web.MainKt")
}
dependencies {
@@ -45,7 +45,7 @@ dependencies {
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.9.8") {
exclude("org.jetbrains.kotlin", module = "kotlin-reflect")
}
-
+ implementation("io.sentry:sentry-log4j2:3.1.1")
implementation("org.mongodb:mongodb-driver-sync:4.0.5")
runtimeOnly("org.apache.logging.log4j:log4j-slf4j-impl:2.13.1")
diff --git a/simulator/opendc-runner-web/src/main/kotlin/org/opendc/runner/web/Main.kt b/simulator/opendc-runner-web/src/main/kotlin/org/opendc/runner/web/Main.kt
index 80b3bb20..6369fdd8 100644
--- a/simulator/opendc-runner-web/src/main/kotlin/org/opendc/runner/web/Main.kt
+++ b/simulator/opendc-runner-web/src/main/kotlin/org/opendc/runner/web/Main.kt
@@ -325,7 +325,7 @@ public class RunnerCli : CliktCommand(name = "runner") {
logger.info { "Successfully finished scenario $id" }
} catch (e: Exception) {
- logger.warn(e) { "Scenario failed to finish" }
+ logger.error(e) { "Scenario failed to finish" }
manager.fail(id)
} finally {
heartbeat.cancel()
diff --git a/simulator/opendc-runner-web/src/main/resources/log4j2.xml b/simulator/opendc-runner-web/src/main/resources/log4j2.xml
index 87179332..503bc5dc 100644
--- a/simulator/opendc-runner-web/src/main/resources/log4j2.xml
+++ b/simulator/opendc-runner-web/src/main/resources/log4j2.xml
@@ -23,21 +23,26 @@
~ SOFTWARE.
-->
-<Configuration status="WARN">
+<Configuration status="WARN" packages="org.apache.logging.log4j.core,io.sentry.log4j2">
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%highlight{%-5level}] %logger{36} - %msg%n" disableAnsi="false"/>
</Console>
+
+ <Sentry name="Sentry" />
</Appenders>
<Loggers>
<Logger name="org.opendc" level="warn" additivity="false">
<AppenderRef ref="Console"/>
+ <AppenderRef ref="Sentry"/>
</Logger>
<Logger name="org.opendc.runner" level="info" additivity="false">
<AppenderRef ref="Console"/>
+ <AppenderRef ref="Sentry"/>
</Logger>
- <Root level="error">
- <AppenderRef ref="Console"/>
+ <Root level="info">
+ <AppenderRef level="error" ref="Console"/>
+ <AppenderRef ref="Sentry"/>
</Root>
</Loggers>
</Configuration>