Skip to content

syncthing generate command writes the deviceId to stderr instead of stdout as INFO #8682

Closed

Description

@MinaKhamesi
  • syncthing version v1.22.1
  • ubuntu 18

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

Activity

  1. added
    bug
    needs-triage
    on Nov 18, 2022
  2. calmh commented on Nov 18, 2022

    @calmh
    Member

    Huh. Which version is "before"?

  3. added 2 commits that reference this issue on Nov 18, 2022
    9e78501
    b3da072
  4. calmh commented on Nov 19, 2022

    @calmh
    Member

    This changed between 1.18.4 and 1.18.5, inadvertently, as part of moving the generate command.

  5. added a commit that references this issue on Nov 19, 2022
    a7a87cd
  6. calmh commented on Nov 19, 2022

    @calmh
    Member

    I added an alternate implementation.

  7. added a commit that references this issue on Nov 20, 2022
    24275b4
  8. MinaKhamesi commented on Nov 21, 2022

    @MinaKhamesi
    Author

    @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

  9. added this to the v1.22.2 milestone on Nov 22, 2022
  10. added a commit that references this issue on Nov 22, 2022
    4ee1015
  11. added
    frozen-due-to-age
    on Nov 20, 2023
  12. locked and limited conversation to collaborators on Nov 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugfrozen-due-to-ageneeds-triage

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions