write_prometheus plugin: Implement logging callback.