You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
syncthing generate command writes the deviceId to stderr instead of stdout as INFO #8682
bugA problem with current functionality, as opposed to missing functionality (enhancement)frozen-due-to-ageIssues closed and untouched for a long time, together with being locked for discussionneeds-triageNew issues needed to be validated
I had a script in which I was running syncthing -generate=my_dir and I was grabbing the DevideId from the output, after upgrading to new version of syncthing, that part of code broke, because apperantly now the deviceId is getting printed to stderr instead of stdout and my code cannot capture it. I did fix it by redirecting stderr to stdout. But it would be nice if I didn't have to do that since that is not actually an error.
the output of syncthing -generate before:
16:28:02 INFO: Device ID: 6C4FCZ7-N2OUG4Y-YYNLDGP-FSRR6RY-SQUUGRH-TIV4AAK-C3SDB62-Q4QBDQC
16:28:02 INFO: Default folder created and/or linked to new config
and the output I am getting now:
2022/11/16 16:34:33 INFO: Generating ECDSA key and certificate for syncthing...
2022/11/16 16:34:33 Device ID: 3IPJSF4-TWXI57O-P64DONH-DRCPFEL-JRWFFJT-4MLAFUR-CTJNSQG-U2JFZAO
2022/11/16 16:34:33 INFO: Default folder created and/or linked to new config
the first and third are INFo and are in stdout, but the middle one, devideId, is getting printed in stderr
@calmh Thanks for quick reply and quick action 👍🏼 . I see the change is in main now, do you know roughly when can I expect a release with this new change?
bugA problem with current functionality, as opposed to missing functionality (enhancement)frozen-due-to-ageIssues closed and untouched for a long time, together with being locked for discussionneeds-triageNew issues needed to be validated
Activity
calmh commentedon Nov 18, 2022
Huh. Which version is "before"?
cmd/syncthing/generate: Log DeviceId to stdout instead of stderr (fixes
cmd/syncthing/generate: Log DeviceId to stdout instead of stderr (fixes
calmh commentedon Nov 19, 2022
This changed between 1.18.4 and 1.18.5, inadvertently, as part of moving the
generatecommand.cmd/syncthing: Use main logger in generate subcommand (fixes syncthin…
calmh commentedon Nov 19, 2022
I added an alternate implementation.
cmd/syncthing: Use main logger in generate subcommand (fixes #8682) (#…
MinaKhamesi commentedon Nov 21, 2022
@calmh Thanks for quick reply and quick action 👍🏼 . I see the change is in main now, do you know roughly when can I expect a release with this new change?
Thank you so much @calmh
Merge branch 'main' into linuxbuild