Re-route Android log output when using Robolectric
By default, the output of Android's Log class is swallowed when tests are run by Robolectric. This can be avoided by setting the robolectric.logging system property. The following alternatives are available:
- stdout
- stderr
- A path to a custom log file
The last option is especially useful for retaining log files, e.g. by dynamically constructing the file name from test name, date, etc.
Written by Arne Handt
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Logging
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#