diff web/templog.py @ 103:ef59da811986

add debug url
author Matt Johnston <matt@ucc.asn.au>
date Thu, 02 Aug 2012 22:11:13 +0800
parents 3cd1ca6d0489
children 3b4277aaed3c
line wrap: on
line diff
--- a/web/templog.py	Wed Jul 25 23:03:34 2012 +0800
+++ b/web/templog.py	Thu Aug 02 22:11:13 2012 +0800
@@ -79,16 +79,10 @@
                     end = end.strftime(DATE_FORMAT),
                     length = minutes)
 
-@route('/test')
-def test():
-    import config
-    import os
-    f = open('%s/testout' % config.DATA_PATH, 'a+')
-    f.write("more")
-    f.flush()
-    f.close()
-
-    return 'done'
+@route('/debug')
+def debuglog():
+    response.set_header('Content-Type', 'text/plain')
+    return log.tail_debug_log()
 
 def main():
     #bottle.debug(True)