Remote Log Activation
Privacy-first logging: configure the SDK without sending data, then activate remotely for specific users from the dashboard.
Privacy-first by default
Initialize with remote: false to prevent API sends while keeping full SDK configuration. When you need to debug a specific user, activate them from the dashboard. Activation is delivered on the next SDK-server touchpoint (init sync, batch send, or manual sync()). For immediate activation, configure a webhook and call sync() when your app receives a push.
How it works
- Initialize the SDK with
remote: false,local: true, anduserId(your app's user identifier) - Logs can still be shown locally, but no data is sent to API until activation
- From the dashboard, go to your project and add the userId to "Remote Log Activation"
- On the next app launch, batch send, or when you call
sync()(e.g. after a push), the SDK receivesremoteLogging.enabled: trueand starts collecting - Deactivate from the dashboard when done — the SDK stops on next response
SDK initialization
// Privacy-first: no logs sent until remotely activated
GrenLogger.initialize({
apiKey: 'your-api-key',
userId: 'user_abc123', // Required for remote activation
remote: false, // Default: true
local: true, // Default: true
});
// Normal mode: send to API and local console
GrenLogger.initialize({
apiKey: 'your-api-key',
userId: 'user_abc123',
remote: true, // Default
local: true, // Default
});Dashboard usage
- Go to your project in the dashboard
- Find the "Remote Log Activation" card
- Enter the userId (from a support ticket, user report, etc.)
- Click "Activate"
- View active activations and deactivate when done
Activation via webhook + push notification
By default, activation takes effect on the next app launch or batch send. For immediate activation, GrenLogger supports webhooks — remote log activation is one of the configurable events. The flow:
- Dashboard: Admin activates remote logs for a user
- Backend: Emits webhook (when configured)
- Your backend: Receives webhook, sends push notification to the user's device
- User's device: Receives push, your app calls
sync() - SDK: Downloads config (including
remoteLogging.enabled: true) - Result: Logs start being sent immediately
Example: call sync() on push receipt
When your app receives a push notification, call sync() to fetch the latest config:
iOS (Swift)
// In UNUserNotificationCenterDelegate or AppDelegate
func userNotificationCenter(_ center: UNUserNotificationCenter,
didReceive response: UNNotificationResponse) {
Task {
let success = await GrenLogger.sync()
// Config updated, remote logging may now be enabled
}
}Android (Kotlin)
// In Firebase Messaging or your push handler
override fun onMessageReceived(remoteMessage: RemoteMessage) {
lifecycleScope.launch {
val success = GrenLogger.sync()
// Config updated, remote logging may now be enabled
}
}Ready to use remote activation?
Create a project and configure the SDK with remote: false and local: true.