[svn-commits] pabelanger: branch group/python_logging r1986 - in /asterisk/team/group/pytho...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Fri Aug 26 20:23:53 CDT 2011
Author: pabelanger
Date: Fri Aug 26 20:23:49 2011
New Revision: 1986
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=1986
Log:
Changing logging format to be similar to Asterisk
Modified:
asterisk/team/group/python_logging/lib/python/asterisk/TestCase.py
asterisk/team/group/python_logging/logger.conf
Modified: asterisk/team/group/python_logging/lib/python/asterisk/TestCase.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/group/python_logging/lib/python/asterisk/TestCase.py?view=diff&rev=1986&r1=1985&r2=1986
==============================================================================
--- asterisk/team/group/python_logging/lib/python/asterisk/TestCase.py (original)
+++ asterisk/team/group/python_logging/lib/python/asterisk/TestCase.py Fri Aug 26 20:23:49 2011
@@ -41,7 +41,7 @@
print "WARNING: no logging.conf file found; using default configuration"
logging.basicConfig(level=self.defaultLogLevel)
- logger.info("Executing " + self.test_name + "...")
+ logger.info("Executing " + self.test_name)
reactor.callWhenRunning(self.run)
def create_asterisk(self, count=1):
@@ -52,7 +52,7 @@
"""
for c in range(count):
- logger.info("Creating Asterisk instance %d ..." % (c + 1))
+ logger.info("Creating Asterisk instance %d" % (c + 1))
self.ast.append(Asterisk(base=self.base))
# Copy shared config files
self.ast[c].install_configs("%s/configs" %
@@ -74,7 +74,7 @@
for c in range(count):
host = "127.0.0.%d" % (c + 1)
self.ami.append(None)
- logger.info( "Creating AMIFactory %d ..." % (c + 1))
+ logger.info("Creating AMIFactory %d" % (c + 1))
self.ami_factory = manager.AMIFactory(username, secret, c)
self.ami_factory.login(host).addCallbacks(self.ami_connect,
self.ami_login_error)
@@ -84,7 +84,7 @@
for c in range(count):
host = "127.0.0.%d" % (c + 1)
self.fastagi.append(None)
- logger.info( "Creating FastAGI Factory %d ..." % (c + 1))
+ logger.info("Creating FastAGI Factory %d" % (c + 1))
self.fastagi_factory = fastagi.FastAGIFactory(self.fastagi_connect)
reactor.listenTCP(4573, self.fastagi_factory,
self.reactor_timeout, host)
@@ -94,7 +94,7 @@
"""
for index, item in enumerate(self.ast):
- logger.info( "Starting Asterisk instance %d ..." % (index + 1))
+ logger.info("Starting Asterisk instance %d" % (index + 1))
self.ast[index].start()
def stop_asterisk(self):
@@ -102,14 +102,14 @@
"""
for index, item in enumerate(self.ast):
- logger.info( "Stopping Asterisk instance %d ..." % (index + 1))
+ logger.info("Stopping Asterisk instance %d" % (index + 1))
self.ast[index].stop()
def stop_reactor(self):
"""
"""
- logger.info( "Stopping Reactor ...")
+ logger.info("Stopping Reactor")
if reactor.running:
reactor.stop()
@@ -120,10 +120,10 @@
reactor.callLater(self.reactor_timeout, self.stop_reactor)
def ami_login_error(self, ami):
- logger.error( "Error logging into AMI")
+ logger.error("Error logging into AMI")
self.stop_reactor()
def ami_connect(self, ami):
- logger.info( "AMI Connect instance %s ..." % (ami.id + 1))
+ logger.info("AMI Connect instance %s" % (ami.id + 1))
self.ami[ami.id] = ami
Modified: asterisk/team/group/python_logging/logger.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/group/python_logging/logger.conf?view=diff&rev=1986&r1=1985&r2=1986
==============================================================================
--- asterisk/team/group/python_logging/logger.conf (original)
+++ asterisk/team/group/python_logging/logger.conf Fri Aug 26 20:23:49 2011
@@ -45,14 +45,15 @@
class=handlers.RotatingFileHandler
level=INFO
formatter=default
-args=('./logs/messages.log', 'a', 67108864, 5)
+args=('./logs/messages', 'a', 67108864, 5)
[handler_verboseFile]
class=handlers.RotatingFileHandler
level=DEBUG
formatter=default
-args=('./logs/full.log', 'a', 67108864, 10)
+args=('./logs/full', 'a', 67108864, 10)
# Formatter definitions for handlers defined in this configuration file
[formatter_default]
-format='%(levelname)s %(asctime)s %(name)s::%(funcName)s[%(lineno)d]: %(message)s'
+format=[%(asctime)s] %(levelname)s[%(process)d]: %(name)s:%(lineno)d %(funcName)s: %(message)s
+datefmt=%b %d %H:%M:%S
class=logging.Formatter
More information about the svn-commits
mailing list