Skip to content

Commit

Permalink
fix: remove third party log module
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhouYixun committed Oct 5, 2022
1 parent 9395de0 commit 6200efb
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 11 deletions.
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ require (
github.com/goinggo/mapstructure v0.0.0-20140717182941-194205d9b4a9
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
github.com/pkg/errors v0.8.0
github.com/qiniu/log v0.0.0-20140728010919-a304a74568d6
github.com/spf13/cobra v1.4.0
)

Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNU
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8=
github.com/pkg/errors v0.8.0 h1:WdK/asTD0HN+q6hsWO3/vpuAkAr+tw6aNJNDFFf0+qw=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/qiniu/log v0.0.0-20140728010919-a304a74568d6 h1:pMot4yzjv8CtGQiGhRvVhwhQl3g4D0Hwkmyd0CVCiyk=
github.com/qiniu/log v0.0.0-20140728010919-a304a74568d6/go.mod h1:WSWulkCEBvfLKNNmweUmJjQGNaYzdHqpTRITXdUNQiQ=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/spf13/cobra v1.4.0 h1:y+wJpx64xcgO1V+RcnwW0LEHxTKRi2ZDPSBjWnrg88Q=
github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g=
Expand Down
3 changes: 1 addition & 2 deletions src/adb/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import (
"errors"
"fmt"
"io"

"github.com/qiniu/log"
"log"
)

/**
Expand Down
5 changes: 2 additions & 3 deletions src/adb/server.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package adb

import (
"log"
"net"
"sync"

"github.com/qiniu/log"
)

/**
Expand Down Expand Up @@ -41,7 +40,7 @@ func (s *ADBDaemon) Serve(ln net.Listener) error {
return err
}
remoteAddress := conn.RemoteAddr().String()
log.Infof("Incomming request from: %v", remoteAddress)
log.Printf("Incomming request from: %v\n", remoteAddress)

s.mu.Lock()
s.remotes[remoteAddress] = conn
Expand Down
6 changes: 3 additions & 3 deletions src/adb/tcpusb.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import (
"crypto/rand"
"encoding/base64"
"fmt"
"log"
"net"
"strings"
"sync"

"github.com/pkg/errors"
"github.com/qiniu/log"
)

/**
Expand Down Expand Up @@ -178,7 +178,7 @@ func (sess *Session) onOpen(pkt Packet) {
return // Not throw error ?
}
name := string(pkt.BodySkipNull())
log.Infof("Calling #%s, remoteId: %d, localId: %d", name, remoteId, localId)
log.Printf("Calling #%s, remoteId: %d, localId: %d\n", name, remoteId, localId)

service := &TransportService{
localId: localId,
Expand All @@ -199,7 +199,7 @@ func (sess *Session) forwardServicePacket(pkt Packet) {
service, ok := sess.services[pkt.Arg1] // localId
sess.mu.Unlock()
if !ok {
log.Warnf("Receive packet of already closed service: localId: %d", pkt.Arg1)
log.Printf("Receive packet of already closed service: localId: %d\n", pkt.Arg1)
return
}
service.handle(pkt)
Expand Down

0 comments on commit 6200efb

Please sign in to comment.