[BUGFIX] Refactor logging & exception handling#1696
Merged
microtechno9000 merged 20 commits intoautomatic-ripping-machine:mainfrom Feb 17, 2026
Merged
[BUGFIX] Refactor logging & exception handling#1696microtechno9000 merged 20 commits intoautomatic-ripping-machine:mainfrom
microtechno9000 merged 20 commits intoautomatic-ripping-machine:mainfrom
Conversation
Contributor
Author
|
I don't understand why the CI is complaining about code I did not touch :( |
Contributor
Author
|
Huh? I did not touch that part either, at least in this PR 😅 |
Before: [2026-02-06 18:40:20] DEBUG ARM: Class.method <message> After: 2026-02-08 10:18:08 ARM: DEBUG: Class.method: <message> - stdout now uses short formatting (eg. for journald, which timestamps stdout) - Handling of debug level formatting is more consistent now - Removed `clean_loggers()`: - This function wasn't really doing what it said it was, since it was only removing at most one handler. Instead, I opted to only remove FileHandlers, such that if a more specific log file is created, the messages are not also logged to arm.log, but they are still logged to stdout and syslog.
Some containers don't have or need a syslog
Replaces all bare Exceptions and all sys.exit() calls with RipperExceptions. - more consistent error handling - simplified make_dir helper function - removed try-catch where we were calling sys.exit() anyways
Closes automatic-ripping-machine#1360 UNIDENTIFIED_EJECT is not necessary anymore, since the ripper will now always eject at the end (if AUTO_EJECT is set), even if an error is thrown, so we can do away with the unreliable pre-check entirely and rest assured that the ripper itself is much more capable of correctly identifying whether a disc is rippable or not.
f688b5d to
589b80e
Compare
11 tasks
microtechno9000
approved these changes
Feb 17, 2026
Collaborator
microtechno9000
left a comment
There was a problem hiding this comment.
Nice work on improving the log handling, will make future updates easier
|
9850e69
into
automatic-ripping-machine:main
11 of 12 checks passed
4 tasks
7 tasks
7 tasks
uprightbass360
added a commit
to uprightbass360/automatic-ripping-machine-neu
that referenced
this pull request
Apr 3, 2026
Wrap the arm.yaml write during config migration in try/except OSError so startup doesn't crash when the config file is mounted read-only (e.g. Docker bind-mount). The API settings layer already handles this case, but the startup migration path did not. Also removes redundant explicit file.close() — the with-statement handles cleanup. Ref: upstream automatic-ripping-machine#1696
2 tasks
uprightbass360
added a commit
to uprightbass360/automatic-ripping-machine-neu
that referenced
this pull request
Apr 4, 2026
Wrap the arm.yaml write during config migration in try/except OSError so startup doesn't crash when the config file is mounted read-only (e.g. Docker bind-mount). The API settings layer already handles this case, but the startup migration path did not. Also removes redundant explicit file.close() — the with-statement handles cleanup. Ref: upstream automatic-ripping-machine#1696
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
The most important changes are:
sys.exit()and all bareExceptions in the ripper withRipperExceptionsUNIDENTIFIED_EJECTlogic entirelyFixes #1360, #779
For the complete changelog, please check the individual commit messages, I did my best to justify each change individually and in detail. That is the mode I recommend doing code review in (per commit, not per file).
I believe that my commits are atomic and for this reason I would ask if they could possibly be spared from being squashed before being merged, since squashing them would remove quite a lot of information. If they are squashed, one cannot easily connect the justification to the singular change anymore. The reason I am not splitting this into more PRs is because that would take a lot of time to coordinate, since almost all of the commits in this PR depend on the ones before them.
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
LOGLEVELsChecklist
Logs
DVDVIDEO_177054228848.log