id	summary	reporter	owner	description	type	status	priority	component	severity	resolution	keywords	cc	release
5148	[Patch] Traceback from logging module when log is empty	ebray	osimons	Immediately after enabling the developer plugin in a particular environment I started getting an `IndexError` with this traceback on every page:\r\n{{{\r\nFile "/usr/local/lib/python2.5/site-packages/trac/web/main.py", line 438, in _dispatch_request\r\n  dispatcher.dispatch(req)\r\nFile "/usr/local/lib/python2.5/site-packages/trac/web/main.py", line 230, in dispatch\r\n  data, content_type)\r\nFile "/usr/local/lib/python2.5/site-packages/trac/web/chrome.py", line 745, in render_template\r\n  stream.render(method, doctype=doctype, out=buffer)\r\nFile "/usr/local/lib/python2.5/site-packages/genshi/core.py", line 179, in render\r\n  return encode(generator, method=method, encoding=encoding, out=out)\r\nFile "/usr/local/lib/python2.5/site-packages/genshi/output.py", line 61, in encode\r\n  for chunk in iterator:\r\nFile "/usr/local/lib/python2.5/site-packages/genshi/output.py", line 311, in __call__\r\n  for kind, data, pos in stream:\r\nFile "/usr/local/lib/python2.5/site-packages/genshi/output.py", line 753, in __call__\r\n  for kind, data, pos in stream:\r\nFile "/usr/local/lib/python2.5/site-packages/genshi/output.py", line 592, in __call__\r\n  for kind, data, pos in stream:\r\nFile "/usr/local/lib/python2.5/site-packages/genshi/output.py", line 698, in __call__\r\n  for kind, data, pos in chain(stream, [(None, None, None)]):\r\nFile "/usr/local/lib/python2.5/site-packages/genshi/output.py", line 532, in __call__\r\n  for ev in stream:\r\nFile "/usr/local/lib/python2.5/site-packages/genshi/core.py", line 283, in _ensure\r\n  for event in stream:\r\nFile "/usr/local/lib/python2.5/site-packages/genshi/core.py", line 283, in _ensure\r\n  for event in stream:\r\nFile "/usr/local/lib/python2.5/site-packages/trac/web/chrome.py", line 811, in _strip_accesskeys\r\n  for kind, data, pos in stream:\r\nFile "/usr/local/lib/python2.5/site-packages/genshi/core.py", line 283, in _ensure\r\n  for event in stream:\r\nFile "/usr/local/lib/python2.5/site-packages/trac/web/chrome.py", line 800, in _generate\r\n  for kind, data, pos in stream:\r\nFile "/usr/local/lib/python2.5/site-packages/genshi/core.py", line 283, in _ensure\r\n  for event in stream:\r\nFile "/usr/local/lib/python2.5/site-packages/genshi/core.py", line 283, in _ensure\r\n  for event in stream:\r\nFile "/mnt/hgfs/home/Source/tracdeveloperplugin/trunk/tracdeveloper/log.py", line 64, in fn\r\n  first_time = req._tracdeveloper_hdlr.buf[0].created\r\n}}}\r\n\r\nEventually I realized that it was because nothing was coming up in the log during that request (as the log level was set to WARNING).  Clearly this feature was meant to be used with the log level set to DEBUG, which would make sense for development purposes.  But this bit me by trying to use the plugin in an environment where DEBUG would not be the default.\r\n\r\nPerhaps the log module should itself log a warning if the log level is set above DEBUG.	defect	closed	normal	TracDeveloperPlugin	normal	fixed			0.11
