3 Commits

5 changed files with 10 additions and 10 deletions

View File

@@ -155,7 +155,7 @@ func ReadMappingValues(remainder []byte, map_length Integer) (values *MappingVal
"reason": "duplicate key in mapping",
"key": string(key_str),
}).Error("mapping format violation")
log.Printf("DUPE: %s", key_str)
log.Warnf("DUPE: %s", key_str)
errs = append(errs, errors.New("mapping format violation, duplicate key in mapping"))
// Based on other implementations this does not seem to happen often?
// Java throws an exception in this case, the base object is a Hashmap so the value is overwritten and an exception is thrown.
@@ -170,7 +170,7 @@ func ReadMappingValues(remainder []byte, map_length Integer) (values *MappingVal
"value:": string(remainder),
}).Warn("mapping format violation")
errs = append(errs, errors.New("mapping format violation, expected ="))
log.Printf("ERRVAL: %s", remainder)
log.Warnf("ERRVAL: %s", remainder)
break
} else {
remainder = remainder[1:]

View File

@@ -76,7 +76,7 @@ func (r Reseed) SingleReseed(uri string) ([]router_info.RouterInfo, error) {
log.WithError(err).Error("Failed to read SU3 file signature")
return nil, err
}
log.Println("warning: this doesn't validate the signature yet", signature)
log.Debug("warning: this doesn't validate the signature yet", signature)
log.Warn("Doesn't validate the signature yet", logrus.Fields{"signature": signature})
}
zip := filepath.Join(config.RouterConfigProperties.NetDb.Path, "reseed.zip")

View File

@@ -152,7 +152,7 @@ func (db *StdNetDB) RecalculateSize() (err error) {
}
if db.CheckFilePathValid(fname) {
log.WithField("file_name", fname).Debug("Reading RouterInfo file")
log.Println("Reading in file:", fname)
log.Debug("Reading in file:", fname)
b, err := os.ReadFile(fname)
if err != nil {
log.WithError(err).Error("Failed to read RouterInfo file")
@@ -165,9 +165,9 @@ func (db *StdNetDB) RecalculateSize() (err error) {
}
ih := ri.IdentHash().Bytes()
log.WithError(err).Error("Failed to parse RouterInfo")
log.Printf("Read in IdentHash: %s", base32.EncodeToString(ih[:]))
log.Debugf("Read in IdentHash: %s", base32.EncodeToString(ih[:]))
for _, addr := range ri.RouterAddresses() {
log.Println(string(addr.Bytes()))
log.Debug(string(addr.Bytes()))
log.WithField("address", string(addr.Bytes())).Debug("RouterInfo address")
}
if ent, ok := db.RouterInfos[ih]; !ok {
@@ -177,13 +177,13 @@ func (db *StdNetDB) RecalculateSize() (err error) {
}
} else {
log.Debug("RouterInfo already in memory cache")
log.Println("entry previously found in table", ent, fname)
log.Debug("entry previously found in table", ent, fname)
}
ri = router_info.RouterInfo{}
count++
} else {
log.WithField("file_path", fname).Warn("Invalid file path")
log.Println("Invalid path error")
log.Debug("Invalid path error")
}
return err
})

View File

@@ -36,7 +36,7 @@ func (c *NoiseSession) RunIncomingHandshake() error {
}
log.Debug("Handshake message written successfully")
log.WithField("state", state).Debug("Handshake state after message write")
log.Println(state)
log.Debug(state)
c.handshakeComplete = true
log.Debug("Incoming handshake completed successfully")
return nil

View File

@@ -39,7 +39,7 @@ func (c *NoiseSession) RunOutgoingHandshake() error {
}
log.Debug("Handshake message written successfully")
log.WithField("state", state).Debug("Handshake state after message write")
log.Println(state)
log.Debug(state)
c.handshakeComplete = true
log.Debug("Outgoing handshake completed successfully")
return nil