oauthdesktop/logger.py should have configurable log level

Bug #488425 reported by Roman Yepishev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu One Client
Confirmed
Undecided
Ubuntu One Client Engineering team
ubuntuone-client (Ubuntu)
Confirmed
Undecided
Ubuntu One Client Engineering team

Bug Description

Binary package hint: ubuntuone-client

Currently log_level is set to INFO in oauthdesktop/logger.py:

LOGFILENAME = os.path.join(LOGFOLDER, 'oauth-login.log')

# Only log this level and above
LOG_LEVEL = logging.INFO

root_formatter = logging.Formatter(
    fmt="%(asctime)s:%(msecs)s %(name)s %(message)s")
root_handler = RotatingFileHandler(LOGFILENAME, maxBytes=1048576,
                                   backupCount=1)
root_handler.setLevel(LOG_LEVEL)

This makes it rather hard to debug oauthdesktop-related issues since debug statements are there but they cannot be turned on easily.

oauth.conf should be created and read by oauthdesktop that will contain at least
[__main__]
log_level = DEBUG

Additionally the code in logger.py should actually use the root_formatter defined. It looks like this statement got removed in some build.

Tags: desktop+
Roman Yepishev (rye)
description: updated
Changed in ubuntuone-client (Ubuntu):
importance: Undecided → Low
status: New → Confirmed
Changed in ubuntuone-client:
status: New → Confirmed
Changed in ubuntuone-client (Ubuntu):
importance: Low → Undecided
Changed in ubuntuone-client:
assignee: nobody → Ubuntu One Desktop+ team (uone-desktop)
Changed in ubuntuone-client (Ubuntu):
assignee: nobody → Ubuntu One Desktop+ team (uone-desktop)
tags: added: desktop+
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.