prune logging #2

Merged
sarah merged 2 commits from logprune into trunk 2021-06-25 05:24:32 +00:00
3 changed files with 3 additions and 7 deletions

7
lib.go
View File

@ -230,10 +230,10 @@ func SendAppEvent(eventJson string) {
// rest of the logic nicer.
var new_event event.Event
json.Unmarshal([]byte(eventJson), &new_event)
log.Infof("Event: %v", new_event)
log.Debugf("Event: %v", new_event.EventType)
// We need to update the local cache
// Ideally I think this would be pusgit hed back into Cwtch
// Ideally I think this would be pushed back into Cwtch
switch new_event.EventType {
case utils.UpdateGlobalSettings:
var globalSettings utils.GlobalSettings
@ -347,7 +347,6 @@ func c_GetAppBusEvent() *C.char {
// GetAppBusEvent blocks until an event
func GetAppBusEvent() string {
log.Debugf("appbusevent called")
for eventHandler == nil {
log.Debugf("waiting for eventHandler != nil")
time.Sleep(time.Second)
@ -355,10 +354,8 @@ func GetAppBusEvent() string {
var json = ""
for json == "" {
log.Debugf("waiting for json != ''")
json = eventHandler.GetNextEvent()
}
log.Debugf("appbusevent: %v", json)
return json
}

View File

@ -362,7 +362,7 @@ func (eh *EventHandler) startHandlingPeer(onion string) {
}
func (eh *EventHandler) forwardProfileMessages(onion string, q event.Queue) {
log.Infof("Launching Forwarding Goroutine for %v", onion)
log.Infof("Launching Forwarding Goroutine")
// TODO: graceful shutdown, via an injected event of special QUIT type exiting loop/go routine
for {
e := q.Next()

View File

@ -247,7 +247,6 @@ func NewManager(profile string, gcd *GrandCentralDispatcher) Manager {
// uiManager.AddContact(onion)
// (handle string, displayName string, image string, badge int, status int, authorization string, loading bool, lastMsgTime int)
func EnrichNewPeer(handle string, ph *PeerHelper, ev *EventProfileEnvelope) error {
log.Infof("Enriching New Peer %v", handle)
if ph.IsGroup(handle) {
group := ph.peer.GetGroup(handle)
if group != nil {