diff options
Diffstat (limited to 'zenserver/zenserver.cpp')
| -rw-r--r-- | zenserver/zenserver.cpp | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/zenserver/zenserver.cpp b/zenserver/zenserver.cpp index 759c08476..1c94d80b7 100644 --- a/zenserver/zenserver.cpp +++ b/zenserver/zenserver.cpp @@ -948,7 +948,7 @@ ZenEntryPoint::Run() { #if ZEN_USE_SENTRY std::string SentryDatabasePath = PathToUtf8(m_ServerOptions.DataDir / ".sentry-native"); - + int SentryErrorCode = 0; if (m_ServerOptions.NoSentry == false) { sentry_options_t* SentryOptions = sentry_options_new(); @@ -959,14 +959,7 @@ ZenEntryPoint::Run() sentry_options_set_release(SentryOptions, ZEN_CFG_VERSION); // sentry_options_set_debug(SentryOptions, 1); - if (int ErrorCode = sentry_init(SentryOptions); ErrorCode == 0) - { - printf("sentry initialized"); - } - else - { - printf("sentry_init returned failure! (error code: %d)", ErrorCode); - } + SentryErrorCode = sentry_init(SentryOptions); } auto _ = zen::MakeGuard([] { sentry_close(); }); @@ -1002,6 +995,17 @@ ZenEntryPoint::Run() InitializeLogging(ServerOptions); +#if ZEN_USE_SENTRY + if (SentryErrorCode == 0) + { + ZEN_INFO("sentry initialized"); + } + else + { + ZEN_WARN("sentry_init returned failure! (error code: {})", SentryErrorCode); + } +#endif + MaximizeOpenFileCount(); ZEN_INFO(ZEN_APP_NAME " - using lock file at '{}'", LockFilePath); |