What is best way of logging all the inputs to a task?

With “plugin composition” there are many possible places where inputs to a build may come from. One or more layers of convention, extension properties, etc. What API on a task callable from a doFirst() would show the collection(s) of all inputs that are in force at the runtime of the build?