import logging.config
import sys
import types

LOGGING_CONFIG = {
    'disable_existing_loggers': False,
    'formatters': {
        'standard': {
            'format': '%(asctime)s - %(levelname)s - %(message)s',
            'datefmt': '[%Y-%m-%dT%H:%M:%S]',
        },
    },
    'handlers': {
        'file': {
            'class': 'logging.FileHandler',
            'filename': 'perfrunner.log',
            'formatter': 'standard',
            'mode': 'w',
        },
        'stream': {
            'class': 'logging.StreamHandler',
            'formatter': 'standard',
        },
    },
    'loggers': {
        '': {
            'handlers': ['stream', 'file'],
            'level': logging.INFO,
            'propagate': True,
        },
        'paramiko': {
            'level': logging.WARNING,
        },
        'requests': {
            'level': logging.ERROR,
        },
        'urllib3': {
            'level': logging.WARNING,
        },
    },
    'version': 1,
}


def error(self, msg, *args, **kwargs):
    self.error(msg, *args, **kwargs)
    sys.exit(1)


logging.config.dictConfig(LOGGING_CONFIG)

logger = logging.getLogger()

logger.interrupt = types.MethodType(error, logger)

import logging.config
import sys
import types

LOGGING_CONFIG = {
    'disable_existing_loggers': False,
    'formatters': {
        'standard': {
            'format': '%(asctime)s - %(levelname)s - %(message)s',
            'datefmt': '%Y-%m-%dT%H:%M:%S',
        },
    },
    'handlers': {
        'file': {
            'class': 'logging.FileHandler',
            'filename': 'perfrunner.log',
            'formatter': 'standard',
            'mode': 'w',
        },
        'stream': {
            'class': 'logging.StreamHandler',
            'formatter': 'standard',
        },
    },
    'loggers': {
        '': {
            'handlers': ['stream', 'file'],
            'level': logging.INFO,
            'propagate': True,
        },
        'paramiko': {
            'level': logging.WARNING,
        },
        'requests': {
            'level': logging.ERROR,
        },
        'urllib3': {
            'level': logging.WARNING,
        },
    },
    'version': 1,
}


def error(self, msg, *args, **kwargs):
    self.error(msg, *args, **kwargs)
    sys.exit(1)


logging.config.dictConfig(LOGGING_CONFIG)

logger = logging.getLogger()

logger.interrupt = types.MethodType(error, logger)

Remove brackets around data and time in logs
Remove brackets around data and time in logs

Change-Id: Ia424eecb8a30ee9f73b9b007db2fd81f07ab509f
Reviewed-on: http://review.couchbase.org/79748
Well-Formed: Build Bot <80754af91bfb6d1073585b046fe0a474ce868509@couchbase.com>
Tested-by: Build Bot <80754af91bfb6d1073585b046fe0a474ce868509@couchbase.com>
Reviewed-by: Pavel Paulau <dd88eded64e90046a680e3a6c0828ceb8fe8a0e7@gmail.com>
