aboutsummaryrefslogtreecommitdiff
path: root/zenserver/zenserver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'zenserver/zenserver.cpp')
-rw-r--r--zenserver/zenserver.cpp23
1 files changed, 14 insertions, 9 deletions
diff --git a/zenserver/zenserver.cpp b/zenserver/zenserver.cpp
index 9e15b0c64..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();
@@ -956,16 +956,10 @@ ZenEntryPoint::Run()
sentry_options_set_database_path(SentryOptions, SentryDatabasePath.c_str());
sentry_options_set_logger(SentryOptions, SentryLogFunction, this);
sentry_options_add_attachment(SentryOptions, m_ServerOptions.AbsLogFile.string().c_str());
+ 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(); });
@@ -1001,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);