incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [25/36] git commit: [#6388] separate out timermiddleware logging into stats.log
Date Fri, 20 Dec 2013 18:50:51 GMT
[#6388] separate out timermiddleware logging into stats.log


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/cb04420b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/cb04420b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/cb04420b

Branch: refs/heads/db/6388
Commit: cb04420b059477acb7976f60a6a62152719dcebe
Parents: 4ab4c42
Author: Dave Brondsema <dbrondsema@slashdotmedia.com>
Authored: Tue Dec 17 17:43:57 2013 +0000
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Fri Dec 20 17:41:06 2013 +0000

----------------------------------------------------------------------
 Allura/development.ini | 24 +++++++++++++++++++++---
 1 file changed, 21 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/cb04420b/Allura/development.ini
----------------------------------------------------------------------
diff --git a/Allura/development.ini b/Allura/development.ini
index b9df222..930bbb8 100644
--- a/Allura/development.ini
+++ b/Allura/development.ini
@@ -333,13 +333,13 @@ override_root = task
 # http://docs.python.org/lib/logging-config-fileformat.html
 
 [loggers]
-keys = root, allura, sqlalchemy, paste, amqp, pylons, taskdstatus
+keys = root, allura, sqlalchemy, paste, amqp, pylons, taskdstatus, timermiddleware
 
 [handlers]
-keys = console, stats, taskdstatus
+keys = console, stats, taskdstatus, timermiddleware
 
 [formatters]
-keys = generic, stats
+keys = generic, stats, timermiddleware
 
 # If you create additional loggers, add them as a key to [loggers]
 [logger_root]
@@ -379,6 +379,12 @@ level = INFO
 qualname = taskdstatus
 handlers = taskdstatus
 
+[logger_timermiddleware]
+level = INFO
+handlers = timermiddleware
+qualname = stats
+propagate = 0
+
 # If you create additional handlers, add them as a key to [handlers]
 [handler_console]
 class = StreamHandler
@@ -398,6 +404,14 @@ args = ('taskd_status.log', 'a')
 level = NOTSET
 formatter = generic
 
+[handler_timermiddleware]
+class = handlers.WatchedFileHandler
+# if you run 'paster serve' in allura/Allura/ then that's where this file will be
+# you may want to hard-code a specific directory here.
+args = ('stats.log', 'a')
+level = NOTSET
+formatter = timermiddleware
+
 # If you create additional formatters, add them as a key to [formatters]
 [formatter_generic]
 format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
@@ -406,3 +420,7 @@ datefmt = %H:%M:%S
 [formatter_stats]
 format = %(asctime)s %(created)d %(kwpairs)s
 datefmt = %d/%b/%Y:%H:%M:%S UTC
+
+[formatter_timermiddleware]
+format = {"time": "%(asctime)s,%(msecs)03d", "level": "%(levelname)-5.5s", "name": "%(name)s",
"message": %(message)s}
+datefmt = %Y-%m-%d %H:%M:%S
\ No newline at end of file


Mime
View raw message