copy from beego/logs