~diegosarmentero/ubuntuone-client/darwin2-fsevents

« back to all changes in this revision

Viewing changes to ubuntuone/platform/logger/__init__.py

  • Committer: Diego Sarmentero
  • Date: 2012-06-22 14:07:26 UTC
  • mfrom: (1261.2.3 ubuntuone-client)
  • Revision ID: diego.sarmentero@canonical.com-20120622140726-3m0w05qwslv24x8d
merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
# files in the program, then also delete it here.
29
29
"""Logger module."""
30
30
 
 
31
import os
31
32
import sys
32
33
 
 
34
from dirspec.basedir import xdg_cache_home
33
35
 
34
36
if sys.platform == "win32":
35
37
    from ubuntuone.platform.logger import windows
44
46
 
45
47
get_filesystem_logger = source.get_filesystem_logger
46
48
setup_filesystem_logging = source.setup_filesystem_logging
 
49
 
 
50
ubuntuone_log_dir = os.path.join(xdg_cache_home, 'ubuntuone', 'log')
 
51
ubuntuone_log_dir = ubuntuone_log_dir.decode('utf-8')
 
52
if not os.path.exists(ubuntuone_log_dir):
 
53
    os.makedirs(ubuntuone_log_dir)