Movatterモバイル変換


[0]ホーム

URL:


Dev guideRecipesAPI ReferenceChangelog
Dev guideAPI ReferenceRecipesChangelogUser GuideGitHubDev CommunityOptimizely AcademySubmit a ticketLog InFeature Experimentation
Dev guide
All
Pages
Start typing to search…

Customize the Android SDK logger

Customize log information from the Optimizely Feature Experimentation Android SDK for debugging experiments.

Thelogger captures details about your experiments, making it easier for you to debug them. You can customize where the log information is stored and choose the types of data you want to track.

For the Android SDK, you can use Optimizely's Android SLF4Jlogger. You can control logging verbosity through theandroid-logger.properties file and place it insrc/main/resources. You can also include a copy insrc/release/resources with different settings for the build you release to the Play Store. Read aboutadvanced configuration options.

To improve your experience setting up the SDK and configuring your production environment, pass in a logger for your Optimizely client. See the following code sample.

❗️

Warning

Due to athe Log4j library vulnerability, you should upgrade to version 2.15.0 or higher if you are using it with the SDK.

# android-logger.properties example (JSON)# Java Core SDKlogger.com.optimizely.ab.Optimizely=DEBUG:Optly.corelogger.com.optimizely.ab.annotations=DEBUG:Optly.annotationslogger.com.optimizely.ab.bucketing=DEBUG:Optly.bucketinglogger.com.optimizely.ab.config=DEBUG:Optly.configlogger.com.optimizely.ab.error=DEBUG:Optly.errorlogger.com.optimizely.ab.event=DEBUG:Optly.eventlogger.com.optimizely.ab.internal=DEBUG:Optly.internal# Android SDKlogger.com.optimizely.ab.android.sdk=DEBUG:Optly.androidSdklogger.com.optimizely.ab.android.event_handler=DEBUG:Optly.eventHandlerlogger.com.optimizely.ab.android.shared=DEBUG:Optly.sharedlogger.com.optimizely.ab.android.user_profile=DEBUG:Optly.userProfile# Disable most SDK logs by commenting all other lines and uncommenting below# logger.com.optimizely.ab=ASSERT:Optly

Log levels

The following list shows the log levels for the Android SDK.

  • ERROR – Logs events that prevent feature flags from working properly, such as an invalid data file during initialization or incorrect feature keys. These issues require user intervention to fix.
  • WARN – Logs events that do not prevent feature flags from working properly but may cause unexpected results, such as future API deprecation, improper logger or error handler settings, and nil values from getters.
  • INFO – Logs key events to illustrate the lifecycle of an API call, such as when a decision or tracking starts and succeeds.
  • DEBUG – Logs extra information related to errors that aid Optimizely in debugging, like when a feature flag is not running or a user is not included in a rollout.

Updated 18 days ago



[8]ページ先頭

©2009-2025 Movatter.jp