Changeset 782
- Timestamp:
- 11/03/05 00:52:16
- Files:
-
- trunk/cherrypy/_cphttptools.py (modified) (1 diff)
- trunk/cherrypy/test/test_core.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/cherrypy/_cphttptools.py
r777 r782 215 215 self.simpleCookie.load(value) 216 216 217 # Write a message to the error.log only if there is no access.log.218 # This is only here for backwards-compatibility (with the time219 # before the access.log existed), and should be removed in CP 2.2.220 fname = cherrypy.config.get('server.logAccessFile', '')221 if not fname:222 msg = "%s - %s" % (self.remoteAddr, self.requestLine)223 cherrypy.log(msg, "HTTP")224 225 217 # Save original values (in case they get modified by filters) 226 218 self.originalParamMap = self.paramMap trunk/cherrypy/test/test_core.py
r778 r782 431 431 self.assertEqual(data, []) 432 432 433 # Test that error log gets access messages if no logAccess defined.434 self.getPage("/params/?thing=a")435 self.assertBody("'a'")436 data = open(logFile, "rb").readlines()437 self.assert_(data[0].endswith(' HTTP INFO 127.0.0.1 - GET %s/params/?thing=a HTTP/1.1\n'438 % helper.vroot))439 440 433 # Test that tracebacks get written to the error log. 441 434 ignore = helper.webtest.ignored_exceptions … … 445 438 self.assertInBody("raise ValueError()") 446 439 data = open(logFile, "rb").readlines() 447 self.assertEqual(data[ 2][-41:], ' INFO Traceback (most recent call last):\n')448 self.assertEqual(data[ 8], ' raise ValueError()\n')440 self.assertEqual(data[0][-41:], ' INFO Traceback (most recent call last):\n') 441 self.assertEqual(data[6], ' raise ValueError()\n') 449 442 finally: 450 443 ignore.pop()

