Mock the log method for testing NCM components

Reported by @msmark.