CloudNet icon indicating copy to clipboard operation
CloudNet copied to clipboard

non blocking output reader

Open DasBabyPixel opened this issue 1 year ago • 2 comments

Motivation

Logging had some issues with blocking when a full line wasn't written in output.

Modification

Fixed those issues by implementing a custom readLine() which calls ready() before every read()

Result

Logging works with the new system (and very little delay, which is very nice, as opposed to 1 second polling alternative)

Other context

@0utplay or @GiantTreeLP please review this derklaro is fed up with this problem Still based on the old logging to better highlight modifications. This is the reason why this is a conflict As soon as this is reviewed I can rebase/merge and revert the revered new logging system to make this mergeable

DasBabyPixel avatar Oct 02 '24 23:10 DasBabyPixel

Does this catch jvm crashes?

0utplay avatar Oct 03 '24 08:10 0utplay

Does this catch jvm crashes?

Catches invalid jvm arguments image

Also catches everything in a shutdown hook image (Used FileDescriptor, because logging frameworks don't print everything to console, probably some issue with async logging on shutdown)

DasBabyPixel avatar Oct 03 '24 10:10 DasBabyPixel

May have some issues after considerable changes, I'm going to use this in my build first and if I think it is stable, I'm going to mark this ready for review. The reason why the old logging reader stinks: it doesn't catch jvm crashes.

DasBabyPixel avatar Jan 20 '25 15:01 DasBabyPixel