Skip to content

Commit

Permalink
Remove create_message_event method
Browse files Browse the repository at this point in the history
  • Loading branch information
limbonaut committed Jan 10, 2025
1 parent ec07866 commit 988c53a
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 19 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

### Features

- Create or modify events using `SentryEvent` objects and new SDK methods: `SentrySDK.capture_event(event)`, `SentrySDK.create_event()`, `SentrySDK.create_message_event()` ([#51](https://github.com/getsentry/sentry-godot/pull/51))
- Create or modify events using `SentryEvent` objects and new SDK methods: `SentrySDK.create_event()`, `SentrySDK.capture_event(event)` ([#51](https://github.com/getsentry/sentry-godot/pull/51))

## 0.0.3

Expand Down
1 change: 0 additions & 1 deletion src/sentry/disabled_sdk.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ class DisabledSDK : public InternalSDK {
virtual String capture_error(const String &p_type, const String &p_value, Level p_level, const Vector<StackFrame> &p_frames) override { return ""; }

virtual Ref<SentryEvent> create_event() override { return memnew(DisabledEvent); }
virtual Ref<SentryEvent> create_message_event(const String &p_message, Level p_level = sentry::LEVEL_INFO, const String &p_logger = "") override { return memnew(DisabledEvent); };
virtual String capture_event(const Ref<SentryEvent> &p_event) override { return ""; }

virtual void initialize() override {}
Expand Down
1 change: 0 additions & 1 deletion src/sentry/internal_sdk.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ class InternalSDK {
virtual String capture_error(const String &p_type, const String &p_value, Level p_level, const Vector<StackFrame> &p_frames) = 0;

virtual Ref<SentryEvent> create_event() = 0;
virtual Ref<SentryEvent> create_message_event(const String &p_message, sentry::Level p_level, const String &p_logger = "") = 0;
virtual String capture_event(const Ref<SentryEvent> &p_event) = 0;

virtual void initialize() = 0;
Expand Down
9 changes: 0 additions & 9 deletions src/sentry/native/native_sdk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,15 +177,6 @@ Ref<SentryEvent> NativeSDK::create_event() {
return event;
}

Ref<SentryEvent> NativeSDK::create_message_event(const String &p_message, sentry::Level p_level, const String &p_logger) {
sentry_value_t event_value = sentry_value_new_message_event(
native::level_to_native(p_level),
p_logger.utf8().get_data(),
p_message.utf8().get_data());
Ref<SentryEvent> event = memnew(NativeEvent(event_value));
return event;
}

String NativeSDK::capture_event(const Ref<SentryEvent> &p_event) {
last_uuid = sentry_uuid_nil();
ERR_FAIL_COND_V_MSG(p_event.is_null(), _uuid_as_string(last_uuid), "Sentry: Can't capture event - event object is null.");
Expand Down
1 change: 0 additions & 1 deletion src/sentry/native/native_sdk.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ class NativeSDK : public InternalSDK {
virtual String capture_error(const String &p_type, const String &p_value, Level p_level, const Vector<StackFrame> &p_frames) override;

virtual Ref<SentryEvent> create_event() override;
virtual Ref<SentryEvent> create_message_event(const String &p_message, Level p_level = sentry::LEVEL_INFO, const String &p_logger = "") override;
virtual String capture_event(const Ref<SentryEvent> &p_event) override;

virtual void initialize() override;
Expand Down
5 changes: 0 additions & 5 deletions src/sentry_sdk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ Ref<SentryEvent> SentrySDK::create_event() const {
return internal_sdk->create_event();
}

Ref<SentryEvent> SentrySDK::create_message_event(const String &p_message, sentry::Level p_level, const String &p_logger) {
return internal_sdk->create_message_event(p_message, p_level, p_logger);
}

String SentrySDK::capture_event(const Ref<SentryEvent> &p_event) {
ERR_FAIL_COND_V_MSG(p_event.is_null(), "", "Sentry: Can't capture event - event object is null.");
return internal_sdk->capture_event(p_event);
Expand Down Expand Up @@ -112,7 +108,6 @@ void SentrySDK::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_user"), &SentrySDK::get_user);
ClassDB::bind_method(D_METHOD("remove_user"), &SentrySDK::remove_user);
ClassDB::bind_method(D_METHOD("create_event"), &SentrySDK::create_event);
ClassDB::bind_method(D_METHOD("create_message_event", "message", "level", "logger"), &SentrySDK::create_message_event, DEFVAL(LEVEL_INFO), DEFVAL(""));
ClassDB::bind_method(D_METHOD("capture_event", "event"), &SentrySDK::capture_event);
}

Expand Down
1 change: 0 additions & 1 deletion src/sentry_sdk.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ class SentrySDK : public Object {
String get_last_event_id() const;

Ref<SentryEvent> create_event() const;
Ref<SentryEvent> create_message_event(const String &p_message, sentry::Level p_level = sentry::LEVEL_INFO, const String &p_logger = "");
String capture_event(const Ref<SentryEvent> &p_event);

SentrySDK();
Expand Down

0 comments on commit 988c53a

Please # to comment.