~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/trace.py

  • Committer: Jelmer Vernooij
  • Date: 2012-02-06 11:36:02 UTC
  • mfrom: (6462 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6463.
  • Revision ID: jelmer@samba.org-20120206113602-yu3j0xe7qbk1szw9
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
194
194
 
195
195
 
196
196
def _get_bzr_log_filename():
197
 
    bzr_log = os.environ.get('BZR_LOG')
 
197
    bzr_log = osutils.path_from_environ('BZR_LOG')
198
198
    if bzr_log:
199
199
        return bzr_log
200
 
    home = os.environ.get('BZR_HOME')
 
200
    home = osutils.path_from_environ('BZR_HOME')
201
201
    if home is None:
202
 
        if sys.platform == 'win32':
203
 
            from bzrlib import win32utils
204
 
            home = win32utils.get_home_location()
205
 
        else:
206
 
            home = os.path.expanduser('~')
 
202
        # GZ 2012-02-01: Logging to the home dir is bad, but XDG is unclear
 
203
        #                over what would be better. On windows, bug 240550
 
204
        #                suggests LOCALAPPDATA be used instead.
 
205
        home = osutils._get_home_dir()
207
206
    return os.path.join(home, '.bzr.log')
208
207
 
209
208