mirror of
https://github.com/duanhf2012/origin.git
synced 2026-02-24 14:44:42 +08:00
修改日志接口调用错误
This commit is contained in:
@@ -1,16 +1,16 @@
|
|||||||
package sysservice
|
package sysservice
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"Server/common"
|
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/duanhf2012/origin/sysmodule"
|
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"net/http"
|
"net/http"
|
||||||
"reflect"
|
"reflect"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/duanhf2012/origin/sysmodule"
|
||||||
|
|
||||||
"github.com/duanhf2012/origin/rpc"
|
"github.com/duanhf2012/origin/rpc"
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
"github.com/gotoxu/cors"
|
"github.com/gotoxu/cors"
|
||||||
@@ -150,7 +150,7 @@ func (slf *HttpRespone) WriteRespne(v interface{}) error {
|
|||||||
StrRet, retErr := json.Marshal(v)
|
StrRet, retErr := json.Marshal(v)
|
||||||
if retErr != nil {
|
if retErr != nil {
|
||||||
slf.Respone = []byte(`{"Code": 2,"Message":"service error"}`)
|
slf.Respone = []byte(`{"Code": 2,"Message":"service error"}`)
|
||||||
common.LogPrintf(sysmodule.LEVER_ERROR, "Json Marshal Error")
|
service.GetLogger().Printf(sysmodule.LEVER_ERROR, "Json Marshal Error:%v\n", retErr)
|
||||||
} else {
|
} else {
|
||||||
slf.Respone = StrRet
|
slf.Respone = StrRet
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user