def write_error_summary(error):
 fullpath = request.environ.get('FULLPATH', request.path)
 uid = (c.user._id if c.user_is_loggedin else '-')
 g.log.error('E: %s U: %s FP: %s', error, uid, fullpath)

def write_error_summary ( error ) : fullpath = request . environ . get ( 'FULLPATH' , request . path ) uid = ( c . user . _id if c . user_is_loggedin else '-' ) g . log . error ( 'E: %s U: %s FP: %s' , error , uid , fullpath )
log a single-line summary of the error for easy log grepping .