Skip to content

Conversation

@0utplay
Copy link
Member

@0utplay 0utplay commented Oct 22, 2025

Motivation

Some service software like velocity tend to crash / stop on a wrong configuration file without printing any warning message. CloudNet does not pick them up and report them anywere thus it is hard for a user to debug why the service is constantly stopping and the user needs to rely on great timing to see something in the screen.

Modification

Add a listener on the existing CloudServicePreForceStopEvent that prints the cached log lines from a service when its killed.
Printing is only done when the feature is not deactivated (set cloudnet.service-watchdog-threshold to <= 0) and the service is only living for the seconds specified in cloudnet.service-watchdog-threshold .

Also the watchdog now only runs every second like it was intended to instead of every tick. Configurable using cloudnet.service-watchdog-interval (millis between to watchdog runs)

Result

Easy debugging for non warn related stop / kills of services.

@0utplay 0utplay requested a review from derklaro October 22, 2025 19:23
@0utplay 0utplay self-assigned this Oct 22, 2025
@0utplay 0utplay added v: 4.X This pull should be included in the 4.0 release in: node An issue/pull request releated to the node module code labels Oct 22, 2025
@github-actions
Copy link

github-actions bot commented Oct 22, 2025

Test Results

 56 files  ±0   56 suites  ±0   4m 14s ⏱️ +26s
570 tests ±0  570 ✅ ±0  0 💤 ±0  0 ❌ ±0 
937 runs  ±0  937 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 47b4a2c. ± Comparison against base commit 610fab6.

This pull request removes 31 and adds 31 tests. Note that renamed tests count towards both.
eu.cloudnetservice.driver.impl.document.gson.JavaTimeSerializerTest ‑ [14] 2025-10-15
eu.cloudnetservice.driver.impl.document.gson.JavaTimeSerializerTest ‑ [23] 12:28:06.266984640
eu.cloudnetservice.driver.impl.document.gson.JavaTimeSerializerTest ‑ [28] 12:28:06.267089024Z
eu.cloudnetservice.driver.impl.document.gson.JavaTimeSerializerTest ‑ [29] 12:28:06.267111867Z
eu.cloudnetservice.driver.impl.document.gson.JavaTimeSerializerTest ‑ [30] 12:28:06.267148355+05:00
eu.cloudnetservice.driver.impl.document.gson.JavaTimeSerializerTest ‑ [31] 12:28:06.267179903-03:00
eu.cloudnetservice.driver.impl.document.gson.JavaTimeSerializerTest ‑ [34] 2025-10-15T12:28:06.267319314
eu.cloudnetservice.driver.impl.document.gson.JavaTimeSerializerTest ‑ [39] 2025-10-15T12:28:06.267459114Z
eu.cloudnetservice.driver.impl.document.gson.JavaTimeSerializerTest ‑ [4] 2025-10-15T12:28:06.257180317Z
eu.cloudnetservice.driver.impl.document.gson.JavaTimeSerializerTest ‑ [5] 2025-10-15T12:19:46.257183593Z
…
eu.cloudnetservice.driver.impl.document.gson.JavaTimeSerializerTest ‑ [14] 2025-10-27
eu.cloudnetservice.driver.impl.document.gson.JavaTimeSerializerTest ‑ [23] 19:36:21.644192404
eu.cloudnetservice.driver.impl.document.gson.JavaTimeSerializerTest ‑ [28] 19:36:21.644302400Z
eu.cloudnetservice.driver.impl.document.gson.JavaTimeSerializerTest ‑ [29] 19:36:21.644322908Z
eu.cloudnetservice.driver.impl.document.gson.JavaTimeSerializerTest ‑ [30] 19:36:21.644359527+05:00
eu.cloudnetservice.driver.impl.document.gson.JavaTimeSerializerTest ‑ [31] 19:36:21.644393641-03:00
eu.cloudnetservice.driver.impl.document.gson.JavaTimeSerializerTest ‑ [34] 2025-10-27T19:36:21.644537070
eu.cloudnetservice.driver.impl.document.gson.JavaTimeSerializerTest ‑ [39] 2025-10-27T19:36:21.644719783Z
eu.cloudnetservice.driver.impl.document.gson.JavaTimeSerializerTest ‑ [4] 2025-10-27T19:36:21.623022375Z
eu.cloudnetservice.driver.impl.document.gson.JavaTimeSerializerTest ‑ [5] 2025-10-27T19:28:01.623027204Z
…

♻️ This comment has been updated with latest results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in: node An issue/pull request releated to the node module code v: 4.X This pull should be included in the 4.0 release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants