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
Wishlist: silence SSHException traceback in run() #922
With the number of automated SSH scans out there our logs are brimming with irrelevant traceback errors (Error reading SSH protocol banner, Incompatible version, etc.) and it makes it increasingly hard to investigate actual errors.
Side note: a lot of the exception handling is pretty mediocre; there need to be way more SSHException subclasses, for example, so certain specific errors can be caught. See #258 for example.
Specific response: doing that makes me leery (at least until the above is fixed and we can relegate such a logging change more specifically) because SSHException could be many things, including errors that aren't specious. I might accept a PR that makes it an opt-in feature (e.g. a general "make logging less verbose overall" settings flag somewhere) as per Seth's comment.
Thanks for your responses. Making it configurable or more granular in exception handling would of course be the most flexible solution, but I realize that it is also far more work than just relegating the stack trace log to debug.
I see your point that the SSHException is rather general, but I would still argue that the traceback log adds very little relevant information except in a non-production (debug) environment. One would still get the error log of the actual exception right before the traceback.
Anyway, it's your decision of course and I just manually patch our production installations for now.
That's a fair point - thanks. I'll throw this in my (overweight, heh) next feature bucket so I have a chance to reconsider it when I go through that next.
Activity
sethmlarson commentedon Mar 23, 2017
Maybe this should be an option?
bitprophet commentedon Mar 23, 2017
Side note: a lot of the exception handling is pretty mediocre; there need to be way more SSHException subclasses, for example, so certain specific errors can be caught. See #258 for example.
Specific response: doing that makes me leery (at least until the above is fixed and we can relegate such a logging change more specifically) because SSHException could be many things, including errors that aren't specious. I might accept a PR that makes it an opt-in feature (e.g. a general "make logging less verbose overall" settings flag somewhere) as per Seth's comment.
jonasbardino commentedon Mar 24, 2017
Thanks for your responses. Making it configurable or more granular in exception handling would of course be the most flexible solution, but I realize that it is also far more work than just relegating the stack trace log to debug.
I see your point that the SSHException is rather general, but I would still argue that the traceback log adds very little relevant information except in a non-production (debug) environment. One would still get the error log of the actual exception right before the traceback.
Anyway, it's your decision of course and I just manually patch our production installations for now.
bitprophet commentedon Mar 24, 2017
That's a fair point - thanks. I'll throw this in my (overweight, heh) next feature bucket so I have a chance to reconsider it when I go through that next.