Sends the log message to the Sentry server.
This function is called for each log message that needs to be sent to the Sentry server.
155 {
157 {
158 return;
159 }
160 switch (msg.level)
161 {
162 case spdlog::level::warn:
163 sentry_capture_event(sentry_value_new_message_event(
164 SENTRY_LEVEL_WARNING, "main", std::string(msg.payload.data(), msg.payload.size()).c_str()));
165 break;
166 case spdlog::level::err:
167 sentry_capture_event(sentry_value_new_message_event(
168 SENTRY_LEVEL_ERROR, "main", std::string(msg.payload.data(), msg.payload.size()).c_str()));
169 break;
170 case spdlog::level::critical:
171 sentry_capture_event(sentry_value_new_message_event(
172 SENTRY_LEVEL_FATAL, "main", std::string(msg.payload.data(), msg.payload.size()).c_str()));
173 break;
174 case spdlog::level::trace:
175 case spdlog::level::debug:
176 case spdlog::level::info:
177 case spdlog::level::off:
178
179 break;
180 default:
181 break;
182 }
183 }