@@ -91,12 +91,12 @@ func (e *EventsStore) Add(proc *Process) {
9191 e .UpdateItem (proc )
9292 }
9393 }
94- log .Debug ("[cache] EventsStore.Add() finished %s, %s" , proc .Path , proc .Tree )
94+ log .Debug ("[cache] EventsStore.Add() finished %d, % s, %s" , proc . ID , proc .Path , proc .Tree )
9595}
9696
9797// UpdateItem updates a cache item
9898func (e * EventsStore ) UpdateItem (proc * Process ) {
99- log .Debug ("[cache] updateItem() updating events store (total: %d), pid: %d, path: %s, %v" , e .Len (), proc .ID , proc .Path , proc .Tree )
99+ log .Trace ("[cache] updateItem() updating events store (total: %d), pid: %d, path: %s, %v" , e .Len (), proc .ID , proc .Path , proc .Tree )
100100 if proc .Path == "" {
101101 return
102102 }
@@ -111,7 +111,7 @@ func (e *EventsStore) UpdateItem(proc *Process) {
111111
112112// ReplaceItem replaces an existing process with a new one.
113113func (e * EventsStore ) ReplaceItem (oldProc , newProc * Process ) {
114- log .Debug ("[event inCache, replacement] new: %d, %s -> inCache: %d -> %s - Trees: %s, %s" , newProc .ID , newProc .Path , oldProc .ID , oldProc .Path , oldProc .Tree , newProc .Tree )
114+ log .Trace ("[event inCache, replacement] new: %d, %s -> inCache: %d -> %s - Trees: %s, %s" , newProc .ID , newProc .Path , oldProc .ID , oldProc .Path , oldProc .Tree , newProc .Tree )
115115 // Note: in rare occasions, the process being replaced is the older one.
116116 // if oldProc.Starttime > newProc.Starttime {}
117117 //
@@ -165,11 +165,11 @@ func (e *EventsStore) Update(oldProc, proc *Process) {
165165 }
166166
167167 if updateOld {
168- log .Debug ("[cache] Update end, updating oldProc: %d, %s, %v" , oldProc .ID , oldProc .Path , oldProc .Tree )
168+ log .Trace ("[cache] Update end, updating oldProc: %d, %s, %v" , oldProc .ID , oldProc .Path , oldProc .Tree )
169169 e .UpdateItem (oldProc )
170170 }
171171 if update {
172- log .Debug ("[cache] Update end, updating newProc: %d, %s, %v" , proc .ID , proc .Path , proc .Tree )
172+ log .Trace ("[cache] Update end, updating newProc: %d, %s, %v" , proc .ID , proc .Path , proc .Tree )
173173 e .UpdateItem (proc )
174174 }
175175}
@@ -263,7 +263,7 @@ func (e *EventsStore) Delete(key int) {
263263 e .mu .Lock ()
264264 defer e .mu .Unlock ()
265265 if ! ev .Proc .IsAlive () {
266- log .Debug ("[cache delete] deleted %d: %s" , key , ev .Proc .Path )
266+ log .Trace ("[cache delete] deleted %d: %s" , key , ev .Proc .Path )
267267 delete (e .eventByPID , key )
268268 }
269269 })
@@ -280,7 +280,7 @@ func (e *EventsStore) DeleteOldItems() {
280280 log .Debug ("[cache] deleting old events, total byPID: %d" , len (e .eventByPID ))
281281 for k , item := range e .eventByPID {
282282 if ! item .isValid () && ! item .Proc .IsAlive () {
283- log .Debug ("[cache] deleting old item: %d" , k )
283+ log .Trace ("[cache] deleting old item: %d" , k )
284284 delete (e .eventByPID , k )
285285 }
286286 }
0 commit comments