Skip to content

Commit 968217f

Browse files
committed
chore: added logging
1 parent 369203f commit 968217f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

extjvm/java_process/java_process_watcher.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,11 @@ func IsRunning(p *process.Process) bool {
207207
log.Trace().Err(err).Msgf("Failed to get process status. Pid: %d. Error: %s", p.Pid, err.Error())
208208
return false
209209
}
210-
return utils.ContainsString(RunningStates, status)
210+
containsString := utils.ContainsString(RunningStates, status)
211+
if !containsString {
212+
log.Warn().Msgf("Process %d is not running. Status: %s", p.Pid, status)
213+
}
214+
return containsString
211215
}
212216

213217
func IsRunningProcess(pid int32) bool {

0 commit comments

Comments
 (0)