Logging in "Java Library Code" libs for Android applications

These two links to a mirror of the android open source project (1, 2) seem to suggest that that the default Handler of java.util.Logging on android delegates to android.util.Log, so in your library you should be able to just use java.util.logging apis.

I could not find any further documentation regarding this behaviour


You can use this snippet:

java.util.logging.Logger.getLogger("SOME_TAG").log(Level.INFO, "log message")

And it will look like this in android logger:

2019-03-12 14:14:20.143 31195-32138/your.package.name I/SOME_TAG: log message