🎯 Custom events

Bugbattle custom events allow you to log events at certain key positions within your application. This is super useful to get an even better understanding of what's happening within an application. Custom events do have a name and can contain event specific data as well.

We currently allow a maximum of 1000 events / bug report. If you add more than 1000 events, we will start slicing off the oldest events.

Log an event

The following sample logs an event with the name "User signed in".

Swift
Objective-C
Swift
BugBattle.logEvent("User signed in")
Objective-C
[BugBattle logEvent: @"User signed in"];

Log an event with attached data

It's possible to attach data to custom events. The data can be viewed later on within the bug report.

Swift
Objective-C
Swift
BugBattle.logEvent("User signed in", withData: [
"userId": "1242",
"name": "Isabella",
"skillLevel": "🀩"
])
Objective-C
[BugBattle logEvent: @"User signed in" withData: @{
@"userId": @"1242",
@"name": @"Isabella",
@"skillLevel": @"🀩"
}];

Your events will appear within the activity log of the bug report.

​