From 61b18c06f46546f24075f1cdbddcfbb104cb4516 Mon Sep 17 00:00:00 2001 From: Alan Hamlett Date: Tue, 25 Jun 2013 18:10:20 -0700 Subject: [PATCH] fixed bug in log file path --- README.md | 2 +- plugin/wakatime.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 235c9fe..2c8fe5b 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Add `Bundle 'wakatime/vim-wakatime'` to your `~/.vimrc` 3) Run these shell commands: - touch ~/.wakatime.log; chmod u+w !$ + touch ~/.wakatime.log echo "api_key=MY_API_KEY" > ~/.wakatime vim +BundleInstall +qall diff --git a/plugin/wakatime.py b/plugin/wakatime.py index 44ea598..3e74495 100644 --- a/plugin/wakatime.py +++ b/plugin/wakatime.py @@ -173,7 +173,7 @@ def main(argv): if args.verbose: level = log.DEBUG del args.verbose - log.basicConfig(filename='~/.wakatime.log', format='%(asctime)s vim-wakatime/'+version+' %(levelname)s %(message)s', datefmt='%Y-%m-%dT%H:%M:%SZ', level=level) + log.basicConfig(filename=os.path.expanduser('~/.wakatime.log'), format='%(asctime)s vim-wakatime/'+version+' %(levelname)s %(message)s', datefmt='%Y-%m-%dT%H:%M:%SZ', level=level) tags = tags_from_path(args.task) project = project_from_path(args.task) send_action(project=project, tags=tags, **vars(args))