Reviewed-by: darcy
Added support for customizing diagnostic output via API/command line flags Reviewed-by: jjg