ensync icon indicating copy to clipboard operation
ensync copied to clipboard

Add optional JSON status output

Open pianohacker opened this issue 3 years ago • 4 comments
trafficstars

Closes #7.

pianohacker avatar Sep 09 '22 06:09 pianohacker

@AltSysrq , this does most of what we described. There's three main issues with it:

  1. There's file mode changes in the output I don't quite understand.
  2. 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 LoggerImpl objects? That might be a good followup PR.
  3. 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.

pianohacker avatar Sep 09 '22 06:09 pianohacker

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 … LoggerImpl

I 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().

pianohacker avatar Oct 02 '22 06:10 pianohacker

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.

AltSysrq avatar Oct 04 '22 23:10 AltSysrq

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?

AltSysrq avatar Oct 04 '22 23:10 AltSysrq