X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=website%2Fbugs%2Fmonkeysphere-ssh-proxycommand-quiet-option.mdwn;h=b814d35e38032321e999b657867955df7f4394d8;hb=072e05ac7a9872edc3a3e18e103bbba2706254bf;hp=c139f7e3b858dab9ef270303d12b79515bbcf2e9;hpb=cf9e8e41c93939ada6b553edffa350ccd0f6a76f;p=monkeysphere.git diff --git a/website/bugs/monkeysphere-ssh-proxycommand-quiet-option.mdwn b/website/bugs/monkeysphere-ssh-proxycommand-quiet-option.mdwn index c139f7e..b814d35 100644 --- a/website/bugs/monkeysphere-ssh-proxycommand-quiet-option.mdwn +++ b/website/bugs/monkeysphere-ssh-proxycommand-quiet-option.mdwn @@ -164,3 +164,88 @@ source between `log` and `loge` is unclear, and one of them should be dropped (or they should be better-documented in `/src/common`). --dkg + +---- + +Thanks Big Jimmy and dkg all for the good feedback. + +I think you're right Big Jimmy about the sterr/stout. I may have +accidentally output to stout instead of sterr. In any event - I think +all of the logging should go to sterr to avoid that. + +Here's a proposed fix based on both of your responses - it tries to make +my changes a bit simpler and more consistent with ssh behavior: + + * Use on environmental variable: `MONKEYSPHERE_LOG_LEVEL` that can be set + to `ERROR` or `INFO`, with the default being `INFO`. + `monkeysphere-ssh-proxycommand`, however, will set the + `MONKEYSPHERE_LOG_LEVEL` to `ERROR` unless the user overrides that setting. + + * Use two functions for reporting messages to the user via sterr that + will replace the existing log/loge functions: info (for outputting + "normal operation, everything's fine" messages) and error (for + outputting messages that indicate a problem that we think a user should + know about). Reporting a message to the user with the info function + will only be sent if the `MONKEYSPHERE_LOG_LEVEL` setting is `INFO`. + Reporting a message to the user with the error function will always be + output regardless of the `MONKEYSPHERE_LOG_LEVEL` value. + + * Go through the code and, for each use of the current log/loge + function, determine if they should be replaced with info or error + depending on how critical we think the message is. + +How does that sound? + + --Sir Jam Jam + +----- + +Sir Jam Jam's proposal sounds good to me, but why make it two separate +functions? Given the number of log levels used by OpenSSH, i'd prefer +to make a single function that takes two arguments: the first argument +is the level of the log, and the second argument is the data to be +logged itself. So you'd say: + + log error "This is really terrible and broken!" + log info "The fuzzy bunny just smiled at you and nodded." + +Is that a reasonable amendment? It seems like it will make it easier +to add more levels if we find we need them, and it makes it easy to +find every single log message in the source code at the same time. + + --dkg + +----- + +I just implemented the proposal (incorporating dkg's suggestion about +only having one function). It's committed in my quiet-mode branch (still +not merged with master - pending review). + +Thanks for all the feedback! + +-- SJJ + +---- + +Ok, this plans makes sense. I'll merge SJJ's patches as soon as I get +the chance. + +-- BJ + +---- + +I implemented a variant of SJJ's proposed changes in +bb2427c28bf40179c4881b22c23f23f9bea78f55 (0.12 pre). I tried to make +it so that we could more easily expand the number of levels if need +be. I made a first pass at specifying which output is what priority, +but folks should please speak up if they think the priority of any +particular output should be changed. + +I'll leave the bug open for a bit until it get more tested and 0.12 +gets pushed out. + +-- BJ + +--- + +I think this is [[/bugs/done]] as of version 0.12-1.