[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [snowflake/main] Make all snowflake events LogSeverityNotice



commit 3547b284a9abf219053caaabee3a63f6793d8670
Author: Cecylia Bocovich <cohosh@xxxxxxxxxxxxxx>
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()))
 	}
 
 }



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits