Skip to content

Commit

Permalink
Fix some shit
Browse files Browse the repository at this point in the history
  • Loading branch information
DRSchlaubi committed Jan 28, 2021
1 parent a5f05d7 commit eac38af
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
3 changes: 2 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ services:
- "/etc/timezone:/etc/timezone:ro"
- "/etc/localtime:/etc/localtime:ro"
- ./logs:/user/app/logs
- ./.env:/usr/app/.env
env_file:
- .env
ports:
- 127.0.0.1:8085:80
- 127.0.0.1:8045:80
16 changes: 10 additions & 6 deletions src/main/kotlin/de/nycode/bankobot/Launcher.kt
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,12 @@ import ch.qos.logback.classic.Logger
import de.nycode.bankobot.config.Config
import de.nycode.bankobot.config.Environment
import io.sentry.Sentry
import io.sentry.SentryOptions
import org.slf4j.LoggerFactory

suspend fun main() {
initializeLogging()
initializeSentry()
initializeLogging()
BankoBot()
}

Expand All @@ -43,9 +44,12 @@ private fun initializeLogging() {
}

private fun initializeSentry() {
if (Config.ENVIRONMENT != Environment.DEVELOPMENT) {
Sentry.init { it.dsn = Config.SENTRY_TOKEN }
} else {
Sentry.init { it.dsn = "" }
}
val configure: (SentryOptions) -> Unit =
if (Config.ENVIRONMENT != Environment.DEVELOPMENT) {
{ it.dsn = Config.SENTRY_TOKEN; }
} else {
{ it.dsn = "" }
}

Sentry.init(configure)
}

0 comments on commit eac38af

Please sign in to comment.