add log handle

if you wanna use @{#if DEBUG} in cshtml file, you must keep <compilation
debug="true"/"flase"> available, otherwise this property will be not
working