Remove redundant logging statements
- Removed log statement in `pkg/app/relay/spider-fetch.go` for batch processing - Removed log level output in `main.go` - Removed configuration logging in `pkg/app/config/config.go` - Removed unused log import in `pkg/protocol/ws/subscription.go` - Removed connection success log in `pkg/protocol/ws/client.go` - Added early return condition for non-follow-list kind in `spider-fetch.go`
This commit is contained in:
1
main.go
1
main.go
@@ -42,7 +42,6 @@ func main() {
|
||||
config.PrintHelp(cfg, os.Stderr)
|
||||
os.Exit(0)
|
||||
}
|
||||
log.I.Ln("log level", cfg.LogLevel)
|
||||
lol.SetLogLevel(cfg.LogLevel)
|
||||
if cfg.Pprof {
|
||||
defer profile.Start(profile.MemProfile).Stop()
|
||||
|
||||
@@ -87,7 +87,6 @@ func New() (cfg *C, err error) {
|
||||
lol.SetLogLevel(cfg.LogLevel)
|
||||
log.I.F("loaded configuration from %s", envPath)
|
||||
}
|
||||
log.I.S(cfg)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,6 @@ func (s *Server) SpiderFetch(
|
||||
if len(evs) < len(pubkeys) && !noFetch {
|
||||
// we need to search the spider seeds.
|
||||
// Break up pubkeys into batches of 512
|
||||
log.I.F("breaking up %d pubkeys into batches of 512", len(pubkeys))
|
||||
for i := 0; i < len(pubkeys); i += 512 {
|
||||
end := i + 512
|
||||
if end > len(pubkeys) {
|
||||
@@ -41,7 +40,8 @@ func (s *Server) SpiderFetch(
|
||||
}
|
||||
batchPubkeys := pubkeys[i:end]
|
||||
log.I.F(
|
||||
"processing batch %d to %d of %d pubkeys", i, end, len(pubkeys),
|
||||
"processing batch %d to %d of %d for kind %s",
|
||||
i, end, len(pubkeys), k.Name(),
|
||||
)
|
||||
batchPkList := tag.New(batchPubkeys...)
|
||||
batchFilter := &filter.F{
|
||||
@@ -92,6 +92,9 @@ func (s *Server) SpiderFetch(
|
||||
}
|
||||
}
|
||||
}
|
||||
if !k.Equal(kind.FollowList) {
|
||||
return
|
||||
}
|
||||
// deduplicate and take the newest
|
||||
var tmp event.S
|
||||
evMap := make(map[string]event.S)
|
||||
|
||||
@@ -103,7 +103,6 @@ func RelayConnect(ctx context.T, url string, opts ...RelayOption) (
|
||||
) {
|
||||
r := NewRelay(context.Bg(), url, opts...)
|
||||
err := r.Connect(ctx)
|
||||
log.T.F("connected to %s", url)
|
||||
return r, err
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@ import (
|
||||
"orly.dev/pkg/utils/chk"
|
||||
"orly.dev/pkg/utils/context"
|
||||
"orly.dev/pkg/utils/errorf"
|
||||
"orly.dev/pkg/utils/log"
|
||||
"strconv"
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
@@ -158,7 +157,6 @@ func (sub *Subscription) Close() {
|
||||
closeMsg := closeenvelope.NewFrom(id)
|
||||
var b []byte
|
||||
b = closeMsg.Marshal(nil)
|
||||
log.T.F("{%s} sending %s", sub.Relay.URL, b)
|
||||
<-sub.Relay.Write(b)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user