{"thread":{"id":"35657","subject":"Error logging for git over ssh?","startedAt":"2014-01-14T18:44:28Z","lastAt":"2014-01-15T04:40:58Z","messageCount":3,"participants":["Martin Langhoff","Duy Nguyen"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"233096","messageId":"CACPiFCKBK49Zm8oYcGMVfmsgRwDrPyzWcU7vM6DwJeQitBNsnA@mail.gmail.com","threadId":"35657","inReplyTo":null,"subject":"Error logging for git over ssh?","fromName":"Martin Langhoff","fromEmail":"martin.langhoff@gmail.com","sentAt":"2014-01-14T18:44:28Z","receivedAt":"2014-01-14T18:44:28Z","isPatch":false,"sender":{"key":"martin.langhoff@gmail.com","avatar":"https://gravatar.com/avatar/1e3f311b6c4c15836501901ca58f8c0b0667246488084ba524d8bc9867e22fd9?d=mp&s=160"},"body":"Diagnosing errors with git over ssh has historically required tooling\nup for debugging or looking at things from the client side, because\ngit does not log anything on the server side.\n\nIt would be a boon to those running busy git servers to be able to\ndiagnose by looking at a log. It can be both old-fashioned, or very\nmodern (if you are using journald).\n\nAfter digging around the mailing list, current git master and \"what's\ncooking\", I fail to see anything. Is there a built-in way in modern\ngit to direct stderr on the server side to a logger or to a file? (I\nsee git-daemon has some support, but it does not handle git ssh\nconnections...)\n\nSome common \"use cases\" I've had to debug the hard way:\n\n - a ref is not up to date and the server rejects non-FF pushes\n - perms issues over objects or refs\n - ENOSPC\n - refs have a stale .lock file\n\ncheers,\n\n\n\nm\n-- \n martin.langhoff@gmail.com\n -  ask interesting questions\n - don't get distracted with shiny stuff  - working code first\n ~ http://docs.moodle.org/en/User:Martin_Langhoff\n"},{"id":"233120","messageId":"CACsJy8Cp4Tw4_5px_fp4JY4TDdK2uH+1fYdiM8CBmbisbBbCmw@mail.gmail.com","threadId":"35657","inReplyTo":"CACPiFCKBK49Zm8oYcGMVfmsgRwDrPyzWcU7vM6DwJeQitBNsnA@mail.gmail.com","subject":"Re: Error logging for git over ssh?","fromName":"Duy Nguyen","fromEmail":"pclouds@gmail.com","sentAt":"2014-01-15T01:51:44Z","receivedAt":"2014-01-15T01:51:44Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Wed, Jan 15, 2014 at 1:44 AM, Martin Langhoff\n<martin.langhoff@gmail.com> wrote:\n> Diagnosing errors with git over ssh has historically required tooling\n> up for debugging or looking at things from the client side, because\n> git does not log anything on the server side.\n>\n> It would be a boon to those running busy git servers to be able to\n> diagnose by looking at a log. It can be both old-fashioned, or very\n> modern (if you are using journald).\n\nMaybe we could put a \"pager\" program in front of stderr and let it\ndoes the logging? We'll need to output the error side bands to stderr\ntoo in case side-band is used.\n-- \nDuy\n"},{"id":"233121","messageId":"CACPiFCLuqNMerSZhBtE=3X34Z9FYk+D9XukBzUOtuOWZKEqRGg@mail.gmail.com","threadId":"35657","inReplyTo":"CACsJy8Cp4Tw4_5px_fp4JY4TDdK2uH+1fYdiM8CBmbisbBbCmw@mail.gmail.com","subject":"Re: Error logging for git over ssh?","fromName":"Martin Langhoff","fromEmail":"martin.langhoff@gmail.com","sentAt":"2014-01-15T04:40:58Z","receivedAt":"2014-01-15T04:40:58Z","isPatch":false,"sender":{"key":"martin.langhoff@gmail.com","avatar":"https://gravatar.com/avatar/1e3f311b6c4c15836501901ca58f8c0b0667246488084ba524d8bc9867e22fd9?d=mp&s=160"},"body":"On Tue, Jan 14, 2014 at 8:51 PM, Duy Nguyen <pclouds@gmail.com> wrote:\n> We'll need to output the error side bands to stderr\n> too in case side-band is used.\n\nAgreed, we'd need to \"tee\" the output so it gets to the logger _and_ to stderr.\n\nI thought perhaps daemon.c would have something in this spirit, but\nthe trivial implementation is not what I had expected...\n\ncheers,\n\n\nm\n-- \n martin.langhoff@gmail.com\n -  ask interesting questions\n - don't get distracted with shiny stuff  - working code first\n ~ http://docs.moodle.org/en/User:Martin_Langhoff\n"}]}