A simple log for Debug Trace Warn Error Critacal, extract code from astaxie/beego.