You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by jo...@apache.org on 2014/01/06 16:18:02 UTC
[12/50] git commit: [#6388] separate out timermiddleware logging into
stats.log
[#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/c9f595a6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/c9f595a6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/c9f595a6
Branch: refs/heads/cj/6992
Commit: c9f595a6c6743032e25cd1194eb1f2214bcff963
Parents: 7337947
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Tue Dec 17 17:43:57 2013 +0000
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Thu Jan 2 16:16:19 2014 +0000
----------------------------------------------------------------------
Allura/development.ini | 24 +++++++++++++++++++++---
1 file changed, 21 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/c9f595a6/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