Merge lp:~diegosarmentero/ubuntu-sso-client/too-verbose into lp:ubuntu-sso-client
| Status: | Merged | ||||
|---|---|---|---|---|---|
| Approved by: | Diego Sarmentero on 2012-03-12 | ||||
| Approved revision: | 905 | ||||
| Merged at revision: | 907 | ||||
| Proposed branch: | lp:~diegosarmentero/ubuntu-sso-client/too-verbose | ||||
| Merge into: | lp:ubuntu-sso-client | ||||
| Diff against target: |
436 lines (+48/-29) 10 files modified
ubuntu_sso/qt/current_user_sign_in_page.py (+4/-6) ubuntu_sso/qt/email_verification_page.py (+7/-4) ubuntu_sso/qt/forgotten_password_page.py (+4/-0) ubuntu_sso/qt/network_detection_page.py (+5/-1) ubuntu_sso/qt/reset_password_page.py (+3/-0) ubuntu_sso/qt/setup_account_page.py (+8/-12) ubuntu_sso/qt/sso_wizard_page.py (+3/-2) ubuntu_sso/qt/tests/login_u_p.py (+0/-2) ubuntu_sso/qt/tests/show_gui.py (+0/-2) ubuntu_sso/qt/ubuntu_sso_wizard.py (+14/-0) |
||||
| To merge this branch: | bzr merge lp:~diegosarmentero/ubuntu-sso-client/too-verbose | ||||
| Related bugs: |
|
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Roberto Alsina (community) | Approve on 2012-03-12 | ||
| Natalia Bidart | 2012-03-07 | Approve on 2012-03-12 | |
|
Review via email:
|
|||
Commit Message
- Improve logging operations (LP: #934500).
- 904. By Diego Sarmentero on 2012-03-09
-
Some improves in the logger
| Natalia Bidart (nataliabidart) wrote : | # |
* Please note that there is a decorator "log_call" in ubuntu_
124 @log_call(
125 def on_password_
126 """Action taken when there was an error requesting the reset."""
127 logger.info('Got error on password reset for %s, error: %s',
128 app_name, error)
(the log_call was there before your branch).* Can you please make all the log lines for initializePage be debug?
* All the log lines inside error callbacks should be logger.error, an example:
def on_user_
"""Let the user know we could not register."""
# errors are returned as a dict with the data we want to show.
* Can you please remove this line? logger.
* Could you please add app_name, email and error to the log lines in setup_account_
* In sso_wizard_page.py, can you please change this:
162 logger.
to
162 logger.info('%r - setup_page, backend is %r.', self, self.backend)
so we can detect which child of SSOWizardPage is logging that line.
* In the same file, can you add a logger.error message (or log_call(
134 logger.error('%r - show_error for app_name %r with message %r.',
135 self, app_name, message)
* Could you please add some debug messages in UbuntuSSOWizard for all the _move_* callbacks?
Branch is looking great, we really need this for further debugging, specially when we go live with Precise.
Thanks!
- 905. By Diego Sarmentero on 2012-03-09
-
more improves in the logs.
| Diego Sarmentero (diegosarmentero) wrote : | # |
> * Please note that there is a decorator "log_call" in ubuntu_
> that is being used in some places. You are welcomed to re-use this decorator,
> if you want. But I will request not do use both, like in this case:
>
> 124 @log_call(
> 125 def on_password_
> 126 """Action taken when there was an error requesting the
> reset."""
> 127 logger.info('Got error on password reset for %s, error: %s',
> 128 app_name, error)
>
> (the log_call was there before your branch).* Can you please make all the log
> lines for initializePage be debug?
>
> * All the log lines inside error callbacks should be logger.error, an example:
>
> def on_user_
> """Let the user know we could not register."""
> logger.
> # errors are returned as a dict with the data we want to show.
>
> * Can you please remove this line?
> logger.
>
> * Could you please add app_name, email and error to the log lines in
> setup_account_
> this very easy, since is done automatically)
>
> * In sso_wizard_page.py, can you please change this:
>
> 162 logger.
> to
>
> 162 logger.info('%r - setup_page, backend is %r.', self,
> self.backend)
>
> so we can detect which child of SSOWizardPage is logging that line.
>
> * In the same file, can you add a logger.error message (or
> log_call(
>
> 134 logger.error('%r - show_error for app_name %r with message
> %r.',
> 135 self, app_name, message)
>
> * Could you please add some debug messages in UbuntuSSOWizard for all the
> _move_* callbacks?
>
> Branch is looking great, we really need this for further debugging, specially
> when we go live with Precise.
> Thanks!
Done!

Branch looks good, but I would request a minor tweaks:
* every time you "use" a line from the log, try to have as much info as you can get from your context, so later debugging is easier. For example, here:
we could be also logging the user email, so we can later distinguish userLoggedIn from different email addresses.
Also, please note that default logging on default installs is INFO, so leave the debug entries for truly debug messages, and migrate to INFO those that are providing important info about the progress of the UI.
Thanks!