ensync
ensync copied to clipboard
Add optional JSON status output
Closes #7.
@AltSysrq , this does most of what we described. There's three main issues with it:
- There's file mode changes in the output I don't quite understand.
- Many error messages that cause the sync to completely fail end up as panics. Is the solution to this to convert all of these to calls to a method on the
LoggerImplobjects? That might be a good followup PR. - Most of the specific subtypes of conflict log messages don't appear in the log output. This matters more for completeness than my desired use case.
There's file mode changes in the output I don't quite understand.
Can you elaborate?
e.g., at line of 335 of test/previous-outputs/1.0.1.json, there's a mode change from 384 to 33152.
panics …
LoggerImplI didn't think there were any non-catastrophic situations where the exitsing code would panic like that, and I didn't see any situations where your new code would cause that?
Hm, taking a second look, not panics, but things that are returned as errors rather than being logged. This applies to most of the errors from run_sync().
e.g., at line of 335 of test/previous-outputs/1.0.1.json, there's a mode change from 384 to 33152.
That was actually a bug in ensync put where it failed to mask off the non-permission mode bits. I fixed it on master.
things that are returned as errors rather than being logged. This applies to most of the errors from
run_sync()
Could that just be handled specially here?