Skip to content

Commit 31d0a4e

Browse files
committed
Reducing Sentry.io log.error calls for No Log Found launches with lock files. It will still warning in log, but not report to Sentry when there is no actual stack trace to analyze.
1 parent 9de93db commit 31d0a4e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/windows/main_window.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,11 @@ def create_lock_file(self):
251251
lock_path = os.path.join(info.USER_PATH, ".lock")
252252
# Check if it already exists
253253
if os.path.exists(lock_path):
254-
last_log_line = exceptions.libopenshot_crash_recovery() or "No Log Detected"
255-
log.error(f"Unhandled crash detected: {last_log_line}")
254+
last_log_line = exceptions.libopenshot_crash_recovery()
255+
if last_log_line:
256+
log.error(f"Unhandled crash detected: {last_log_line}")
257+
else:
258+
log.warning(f"Unhandled shutdown detected: No Log Found")
256259
self.destroy_lock_file()
257260
else:
258261
# Normal startup, clear thumbnails

0 commit comments

Comments
 (0)