Browse Source

change npc sdk

刘河 5 years ago
parent
commit
f938b2fdd1
1 changed files with 2 additions and 2 deletions
  1. 2 2
      cmd/npc/sdk.go

+ 2 - 2
cmd/npc/sdk.go

@@ -15,6 +15,7 @@ var cl *client.TRPClient
 
 //export StartClientByVerifyKey
 func StartClientByVerifyKey(serverAddr, verifyKey, connType, proxyUrl *C.char) int {
+	logs.SetLogger("store")
 	if cl != nil {
 		closeBefore = 1
 		cl.Close()
@@ -50,12 +51,11 @@ func CloseClient() {
 func Version() *C.char {
 	return C.CString(version.VERSION)
 }
-
+//export Logs
 func Logs() *C.char {
 	return C.CString(common.GetLogMsg())
 }
 
 func main() {
 	// Need a main function to make CGO compile package as C shared library
-	logs.SetLogger("store")
 }