-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
13 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -93,6 +93,7 @@ import com.github.unchama.seichiassist.task.global._ | |
import com.github.unchama.util.{ActionStatus, ClassUtils} | ||
import io.chrisdavenport.log4cats.slf4j.Slf4jLogger | ||
import io.sentry.Sentry | ||
import io.sentry.SentryLevel; | ||
import org.bukkit.Bukkit | ||
import org.bukkit.ChatColor._ | ||
import org.bukkit.entity.{Entity, Player, Projectile} | ||
|
@@ -137,15 +138,6 @@ class SeichiAssist extends JavaPlugin() { | |
implicit val loggerF: io.chrisdavenport.log4cats.Logger[IO] = | ||
Slf4jLogger.getLoggerFromSlf4j(logger) | ||
|
||
Sentry.init(options => { | ||
options.setDsn("https://[email protected]/2"); | ||
// Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring. | ||
// We recommend adjusting this value in production. | ||
options.setTracesSampleRate(1.0); | ||
// When first trying Sentry it's good to see what the SDK is doing: | ||
options.setDebug(true); | ||
}); | ||
|
||
// endregion | ||
|
||
private var repeatedTaskFiber: Option[Fiber[IO, List[Nothing]]] = None | ||
|
@@ -604,6 +596,18 @@ class SeichiAssist extends JavaPlugin() { | |
// コンフィグ系の設定は全てConfig.javaに移動 | ||
SeichiAssist.seichiAssistConfig = Config.loadFrom(this) | ||
|
||
Sentry.init(options => { | ||
options.setDsn("https://[email protected]/2"); | ||
// Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring. | ||
// We recommend adjusting this value in production. | ||
options.setTracesSampleRate(1.0); | ||
// When first trying Sentry it's good to see what the SDK is doing: | ||
options.setDebug(true); | ||
options.setEnvironment(SeichiAssist.seichiAssistConfig.getServerId); | ||
}); | ||
|
||
Sentry.configureScope(scope => scope.setLevel(SentryLevel.WARNING)); | ||
|
||
if (SeichiAssist.seichiAssistConfig.getDebugMode == 1) { | ||
// debugmode=1の時は最初からデバッグモードで鯖を起動 | ||
logger.info(s"${RED}SeichiAssistをデバッグモードで起動します") | ||
|