Download Install Tutorial Docs FAQ Tools WikiLicense Team IRC Planet Involvement Shop Book

Changeset 782

Show
Ignore:
Timestamp:
11/03/05 00:52:16
Author:
fumanchu
Message:

Removed duplicate error log write that was deprecated in 2.1.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/cherrypy/_cphttptools.py

    r777 r782  
    215215                self.simpleCookie.load(value) 
    216216         
    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 time 
    219         # 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          
    225217        # Save original values (in case they get modified by filters) 
    226218        self.originalParamMap = self.paramMap 
  • trunk/cherrypy/test/test_core.py

    r778 r782  
    431431        self.assertEqual(data, []) 
    432432         
    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          
    440433        # Test that tracebacks get written to the error log. 
    441434        ignore = helper.webtest.ignored_exceptions 
     
    445438            self.assertInBody("raise ValueError()") 
    446439            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') 
    449442        finally: 
    450443            ignore.pop() 

Hosted by WebFaction

Log in as guest/cpguest to create tickets