[tor-commits] [snowflake/main] Make all snowflake events LogSeverityNotice
cohosh at torproject.org
cohosh at torproject.org
Wed Feb 16 18:20:35 UTC 2022
commit 3547b284a9abf219053caaabee3a63f6793d8670
Author: Cecylia Bocovich <cohosh at torproject.org>
Date: Mon Feb 14 14:09:16 2022 -0500
Make all snowflake events LogSeverityNotice
Let's reserve Tor error logs for more severe events that indicate
a client-side bug or absolute failure. By default, tor logs at severity
level notice (and above).
---
client/lib/pt_event_logger.go | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/client/lib/pt_event_logger.go b/client/lib/pt_event_logger.go
index 46b4e05..25883c4 100644
--- a/client/lib/pt_event_logger.go
+++ b/client/lib/pt_event_logger.go
@@ -19,7 +19,7 @@ func (p ptEventLogger) OnNewSnowflakeEvent(e event.SnowflakeEvent) {
case event.EventOnOfferCreated:
e := e.(event.EventOnOfferCreated)
if e.Error != nil {
- pt.Log(pt.LogSeverityError, fmt.Sprintf("offer creation failure %v", e.Error.Error()))
+ pt.Log(pt.LogSeverityNotice, fmt.Sprintf("offer creation failure %v", e.Error.Error()))
} else {
pt.Log(pt.LogSeverityNotice, fmt.Sprintf("offer created"))
}
@@ -27,7 +27,7 @@ func (p ptEventLogger) OnNewSnowflakeEvent(e event.SnowflakeEvent) {
case event.EventOnBrokerRendezvous:
e := e.(event.EventOnBrokerRendezvous)
if e.Error != nil {
- pt.Log(pt.LogSeverityError, fmt.Sprintf("broker failure %v", e.Error.Error()))
+ pt.Log(pt.LogSeverityNotice, fmt.Sprintf("broker failure %v", e.Error.Error()))
} else {
pt.Log(pt.LogSeverityNotice, fmt.Sprintf("broker rendezvous peer received"))
}
@@ -37,7 +37,7 @@ func (p ptEventLogger) OnNewSnowflakeEvent(e event.SnowflakeEvent) {
case event.EventOnSnowflakeConnectionFailed:
e := e.(event.EventOnSnowflakeConnectionFailed)
- pt.Log(pt.LogSeverityError, fmt.Sprintf("connection failed %v", e.Error.Error()))
+ pt.Log(pt.LogSeverityNotice, fmt.Sprintf("connection failed %v", e.Error.Error()))
}
}
More information about the tor-commits
mailing list