A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.mongodb.com/docs/atlas/device-sdks/sdk/swift/sync/log-level/ below:

Set the Client Log Level - Swift SDK - Atlas Device SDKs

You can set or change your app's log level to develop or debug your application. You might want to change the log level to log different amounts of data depending on the app's environment.

Changed in version 10.39.0:: Deprecated in favor of Realm Logger

Warning

This page shows how to set a Sync client log level in Realm Swift SDK versions 10.38.3 and earlier. Realm Swift SDK v10.39.0 supersedes this logging implementation with a Realm logger you can set and configure. For information on how to set a Realm logger in a later version, refer to Logging - Swift SDK.

You can set the Device Sync client log level on the RLMSyncManager instance on your RLMApp.

RLMApp *app = [RLMApp appWithId:YOUR_APP_ID];RLMSyncManager *syncManager = [app syncManager];syncManager.logLevel = RLMSyncLogLevelDebug;

You can set the Device Sync client log level on the SyncManager instance on your App.

let app = App(id: YOUR_APP_SERVICES_APP_ID)let syncManager = app.syncManagersyncManager.logLevel = .debug
Tip

See RLMSyncLogLevel for a description of each available log level. Note that more logging can negatively affect performance.

Tip

To diagnose and troubleshoot errors while developing your application, set the log level to debug or trace. For production deployments, decrease the log level for improved performance.

You can pipe Device Sync logs to a custom logger by setting the logger property on the SyncManager. You must set this property before you open any synced realms.

If you do not specify this property, the Realm Swift SDK outputs log strings to Apple System Logger.

let app = App(id: YOUR_APP_SERVICES_APP_ID)let syncManager = app.syncManagersyncManager.logLevel = .allsyncManager.logger = { logLevel, message in    AnalyticsProvider.shared.logEvent("\(logLevel) : \(message)", category: "Engineering debugging")}

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4