logd: use std::function and lambdas where appropriate

Test: logging unit tests
Change-Id: I7cfc63937b5dadb5547c4661ca2f5204d7b4a174
4 files changed