namespace logger to prevent conflicts with other plugins

This commit is contained in:
Alan Hamlett 2014-07-25 00:59:25 -07:00
parent c07bef55af
commit e392ff6e77
11 changed files with 11 additions and 11 deletions

View file

@ -52,7 +52,7 @@ except:
from .packages import tzlocal3
log = logging.getLogger(__name__)
log = logging.getLogger('WakaTime')
class FileAction(argparse.Action):

View file

@ -73,7 +73,7 @@ def set_log_level(logger, args):
def setup_logging(args, version):
logger = logging.getLogger()
logger = logging.getLogger('WakaTime')
set_log_level(logger, args)
if len(logger.handlers) > 0:
formatter = JsonFormatter(datefmt='%Y/%m/%d %H:%M:%S %z')

View file

@ -19,7 +19,7 @@ from .projects.subversion import Subversion
from .projects.wakatime import WakaTime
log = logging.getLogger(__name__)
log = logging.getLogger('WakaTime')
# List of plugin classes to find a project for the current file path.

View file

@ -13,7 +13,7 @@ import logging
import os
log = logging.getLogger(__name__)
log = logging.getLogger('WakaTime')
class BaseProject(object):

View file

@ -15,7 +15,7 @@ import os
from .base import BaseProject
log = logging.getLogger(__name__)
log = logging.getLogger('WakaTime')
# str is unicode in Python3

View file

@ -15,7 +15,7 @@ import os
from .base import BaseProject
log = logging.getLogger(__name__)
log = logging.getLogger('WakaTime')
# str is unicode in Python3

View file

@ -26,7 +26,7 @@ import os
from .base import BaseProject
log = logging.getLogger(__name__)
log = logging.getLogger('WakaTime')
# str is unicode in Python3

View file

@ -21,7 +21,7 @@ except ImportError:
from ..packages.ordereddict import OrderedDict
log = logging.getLogger(__name__)
log = logging.getLogger('WakaTime')
# str is unicode in Python3

View file

@ -17,7 +17,7 @@ import os
from .base import BaseProject
log = logging.getLogger(__name__)
log = logging.getLogger('WakaTime')
# str is unicode in Python3

View file

@ -22,7 +22,7 @@ except ImportError:
HAS_SQL = False
log = logging.getLogger(__name__)
log = logging.getLogger('WakaTime')
class Queue(object):

View file

@ -20,7 +20,7 @@ else:
from pygments.lexers import guess_lexer_for_filename
log = logging.getLogger(__name__)
log = logging.getLogger('WakaTime')
# force file name extensions to be recognized as a certain language