Merge lp:~james-w/pkgme/dont-make-existing-dir into lp:pkgme
Proposed by
James Westby
Status: | Merged |
---|---|
Approved by: | Jonathan Lange |
Approved revision: | 95 |
Merged at revision: | 97 |
Proposed branch: | lp:~james-w/pkgme/dont-make-existing-dir |
Merge into: | lp:pkgme |
Diff against target: |
36 lines (+13/-2) 2 files modified
pkgme/tests/test_trace.py (+8/-0) pkgme/trace.py (+5/-2) |
To merge this branch: | bzr merge lp:~james-w/pkgme/dont-make-existing-dir |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jonathan Lange | Approve | ||
Review via email:
|
Commit message
Allow overriding the location of the log file.
Description of the change
Hi,
A small change to allow configuring the location of the log file. We're not
going to want it hidden away when pkgme is used by pkgme-service, so having
a way to customize it will be great.
Thanks,
James
To post a comment you must log in.
Two things:
* The test has a copy/pasted comment that's not correct. "If PKGME_LOG_DIR is set, we log there" would be appropriate.
* I would have written the thing like this:
log_dir = os.environ. get("PKGME_ LOG_DIR" , None) expanduser( os.path. join('~ ', '.cache', 'pkgme')) join(log_ dir, log_filename)
log_filename = 'pkgme.log'
if log_dir is None:
log_dir = os.path.
return os.path.
Which isn't superior (two calls to o.p.j), but I thought it might at least be interesting to share.