HUE-578. Adding more logging and more flexible logging for the Shell app.

Review Request #1895 - Created Aug. 9, 2011 and updated

Aditya Acharya
old-hue
aditya
HUE-578
hue
bcwalrus
Adding greater volume of logging (and more flexible logging) to Hue for the Shell app.
Verified that 2 new files, shell_input.log, and shell_output.log, are created and updated as the user performs CRUD operations on shells via Hue.
  1. Thanks for the update. Almost there.
    
    Btw, is this tested in an installed instance (make install)?
  2. apps/shell/src/shell/shellmanager.py (Diff revision 2)
     
     
     
     
     
    Lines too long. And let's factor out the common string.
    
    Also, `command_to_use' is a list. Would be more readable if we join it with spaces.
  3. apps/shell/src/shell/shellmanager.py (Diff revision 2)
     
     
    Nit: Extra space after '('.
  4. apps/shell/src/shell/views.py (Diff revision 2)
     
     
    Trailing whitespace.
  5. apps/shell/src/shell/views.py (Diff revision 2)
     
     
    Same.
  6. apps/shell/src/shell/views.py (Diff revision 2)
     
     
     
    I'd argue that this is not important. I'm not interested in whether it is retrieving output. Only the output itself is interesting.
  7. apps/shell/src/shell/views.py (Diff revision 2)
     
     
    Probably don't need it. See below.
  8. apps/shell/src/shell/views.py (Diff revision 2)
     
     
     
     
     
    This is the part where I wish the objects were more structured, instead of just being dicts.
    
    Rather than type(), would use isinstance().
    
    You can fold the two `if' into one. And would definitely do the per-shell output logging in the for loop. Logging the output of multiple shells together is not that readable.
  9. apps/shell/src/shell/views.py (Diff revision 2)
     
     
     
    Would fold this into the for loop. Log once per shell id.
  10. apps/shell/src/shell/views.py (Diff revision 2)
     
     
     
     
    Would eliminate, for the same reason above.
  11. 
      
Review request changed

Change Summary:

Made changes requested in v2.

Tested on Python 2.4 and 2.6, using both 'make apps' and from the production tarball with 'make install'

Diff:

Revision 3 (+14 -21)

Show changes

  1. Well done. Thanks!
  2. 
      
Loading...