mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-14 05:11:19 -04:00
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).
This commit is contained in:
parent
2c008d6589
commit
3547b284a9
1 changed files with 3 additions and 3 deletions
|
@ -19,7 +19,7 @@ func (p ptEventLogger) OnNewSnowflakeEvent(e event.SnowflakeEvent) {
|
||||||
case event.EventOnOfferCreated:
|
case event.EventOnOfferCreated:
|
||||||
e := e.(event.EventOnOfferCreated)
|
e := e.(event.EventOnOfferCreated)
|
||||||
if e.Error != nil {
|
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 {
|
} else {
|
||||||
pt.Log(pt.LogSeverityNotice, fmt.Sprintf("offer created"))
|
pt.Log(pt.LogSeverityNotice, fmt.Sprintf("offer created"))
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ func (p ptEventLogger) OnNewSnowflakeEvent(e event.SnowflakeEvent) {
|
||||||
case event.EventOnBrokerRendezvous:
|
case event.EventOnBrokerRendezvous:
|
||||||
e := e.(event.EventOnBrokerRendezvous)
|
e := e.(event.EventOnBrokerRendezvous)
|
||||||
if e.Error != nil {
|
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 {
|
} else {
|
||||||
pt.Log(pt.LogSeverityNotice, fmt.Sprintf("broker rendezvous peer received"))
|
pt.Log(pt.LogSeverityNotice, fmt.Sprintf("broker rendezvous peer received"))
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@ func (p ptEventLogger) OnNewSnowflakeEvent(e event.SnowflakeEvent) {
|
||||||
|
|
||||||
case event.EventOnSnowflakeConnectionFailed:
|
case event.EventOnSnowflakeConnectionFailed:
|
||||||
e := e.(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()))
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue