This document includes general information that can be relevant for developers and doesn't fit in any other section.
In order to test scenarios where ad-blocking or Acceptable Ads need to be disabled by default, you can add certain options to the default Chromium command line:
- Disable ad-blocking:
--disable-eyeo-filtering
or--disable-adblock
(legacy switch) - Disable Acceptable Ads:
--disable-aa
These options can be used when testing a debug build.
For more information about using these options on Android, please check the section below Setting command-line options on Android.
Logging in Chromium is generally organized in modules, so you can enable verbose logs for some components and not others. The logging principles aren't described in the Chromium documentation, but a general description of the levels can be found here.
As in many *nix tools, the higher the verbosity level, the more detailed the logs: usually 0 is quiet, 1 is detailed, 2 is very detailed, and 3+ (if used at all) is very low-level debugging output.
To enable very verbose logging for all modules:
--v=2
To enable verbose logging for modules related to subscriptions, ad-blocking and converters:
--vmodule="*subscription*=1,*adblock*=1,*converter*=1"
To enable very verbose Telemetry logs related to user counting:
--vmodule=*telemetry*=2,*activeping*=2
For more information about using these options on Android, please check the section below Setting command-line options on Android.
For easy filtering, eyeo Chromium SDK uses the [eyeo]
prefix for every log output, as in:
DLOG(INFO) << "[eyeo] Annoying ad filtered successfully";
The eyeo Chromium SDK policies when it comes to different logging options (release, debug, verbose) are described in detail below. In general, they are designed considering that SDK users prefer not to see a lot of data in their logs regarding content filtering.
For notifications that are necessary to understand the basics of what is happening in the application, for instance: startup, subscriptions management and user counting. This can be informational, warnings, errors, etc, and should be relevant to partners and QA engineers.
Example:
LOG(INFO) << "[eyeo] I want to help with partner integration testing";
For additional steps in the process. It is more of a step-by-step description that can help a manual QA follow what is happening or where does the application get stuck. Not so much intended for low-level debugging.
--v
(level) or --vmodule
(specific modules).
For debugging purposes, for instance when an important method starts executing.
For extra information during debugging, like low-level tracing. This could be operations that support but don't belong to the main flow of the application, like interactions with the filesystem, or very low-level checks during resource filtering.
Example:
DVLOG(3) << "[ABP] It is crucial for me to broadcast to everyone";
--v
(level) or --vmodule
(specific modules).
Given that the command line isn't a common interface to interact with an Android device, adb
is required to add these options to the Chromium command line.
For instance, to disable ad-blocking:
adb shell 'echo _ --disable-adblock > /data/local/tmp/chrome-command-line'
To verify which command line options are currently set:
adb shell 'cat /data/local/tmp/chrome-command-line'
If the options aren't correctly set after running these commands, follow these additional steps before trying to enable them:
- Install the APK file
- Open it and go to
chrome://flags
- Enable the flag enable commandline on non-rooted devices
- Relaunch the application
- Kill the application
In order to disable the custom options, just remove the file:
adb shell "rm /data/local/tmp/chrome-command-line"