# Path: ProcessProtocolUtils.py
# class TerminalEchoProcessProtocol(protocol.ProcessProtocol):
#     def __init__(self):
#         self.outdata = ''
#         self.errdata = ''
# 
#     def outLineReceived(self, line):
#         print line
#         sys.stdout.flush()
# 
#     def errLineReceived(self, line):
#         print>>sys.stderr, line
# 
#     def outReceived(self, data):
#         self.outdata += data
#         lines = self.outdata.split('\n')
#         for line in lines[:-1]:
#             self.outLineReceived(line)
# 
#         self.outdata = lines[-1]
# 
#     def errReceived(self, data):
#         self.errdata += data
#         lines = self.errdata.split('\n')
#         for line in lines[:-1]:
#             self.errLineReceived(line)
# 
#         self.errdata = lines[-1]
# 
#     def dataReceived(self, data):
#         self.outReceived(data)


from datetime import datetime
from ProcessProtocolUtils import TerminalEchoProcessProtocol
import logging
import os.path

def log(msg):
    tnow = datetime.now()
    logging.info('%s' % msg)

def setupLogging():
    logFormatter = logging.Formatter("%(message)s")
    rootLogger = logging.getLogger()
    rootLogger.setLevel(logging.DEBUG)

    consoleHandler = logging.StreamHandler()
    consoleHandler.setFormatter(logFormatter)
    rootLogger.addHandler(consoleHandler)

class LoggingProtocol(TerminalEchoProcessProtocol):
    def __init__(self, prefix):

# Path: ProcessProtocolUtils.py
# class TerminalEchoProcessProtocol(protocol.ProcessProtocol):
#     def __init__(self):
#         self.outdata = ''
#         self.errdata = ''
# 
#     def outLineReceived(self, line):
#         print line
#         sys.stdout.flush()
# 
#     def errLineReceived(self, line):
#         print>>sys.stderr, line
# 
#     def outReceived(self, data):
#         self.outdata += data
#         lines = self.outdata.split('\n')
#         for line in lines[:-1]:
#             self.outLineReceived(line)
# 
#         self.outdata = lines[-1]
# 
#     def errReceived(self, data):
#         self.errdata += data
#         lines = self.errdata.split('\n')
#         for line in lines[:-1]:
#             self.errLineReceived(line)
# 
#         self.errdata = lines[-1]
# 
#     def dataReceived(self, data):
#         self.outReceived(data)


# Path: LoggingUtils.py
from datetime import datetime
from ProcessProtocolUtils import TerminalEchoProcessProtocol
import logging
import os.path


def log(msg):
    tnow = datetime.now()
    logging.info('%s' % msg)

def setupLogging():
    logFormatter = logging.Formatter("%(message)s")
    rootLogger = logging.getLogger()
    rootLogger.setLevel(logging.DEBUG)

    consoleHandler = logging.StreamHandler()
    consoleHandler.setFormatter(logFormatter)
    rootLogger.addHandler(consoleHandler)

class LoggingProtocol(TerminalEchoProcessProtocol):
    def __init__(self, prefix):

        TerminalEchoProcessProtocol.__init__(self)