cubicweb/pyramid/bwcompat.py
changeset 12764 fb97669efcaa
parent 12741 90348f847b4b
child 12766 682d0790997f
equal deleted inserted replaced
12763:5c609202eb61 12764:fb97669efcaa
    32 
    32 
    33 import cubicweb
    33 import cubicweb
    34 import cubicweb.web
    34 import cubicweb.web
    35 
    35 
    36 from cubicweb.web.application import CubicWebPublisher
    36 from cubicweb.web.application import CubicWebPublisher
    37 
    37 from cubicweb.debug import emit_to_debug_channel
    38 from cubicweb.web import LogOut, PublishException
    38 from cubicweb.web import LogOut, PublishException
    39 
    39 
    40 from cubicweb.pyramid.core import cw_to_pyramid
    40 from cubicweb.pyramid.core import cw_to_pyramid
    41 
    41 
    42 
    42 
    91                             ctrlid, req, appli=self.appli)
    91                             ctrlid, req, appli=self.appli)
    92                         log.info("REQUEST [%s] '%s' selected controller %s at %s:%s",
    92                         log.info("REQUEST [%s] '%s' selected controller %s at %s:%s",
    93                                  ctrlid, req.path, controller,
    93                                  ctrlid, req.path, controller,
    94                                  inspect.getsourcefile(controller.__class__),
    94                                  inspect.getsourcefile(controller.__class__),
    95                                  inspect.getsourcelines(controller.__class__)[1])
    95                                  inspect.getsourcelines(controller.__class__)[1])
       
    96                         emit_to_debug_channel("controller", {
       
    97                             "kind": ctrlid,
       
    98                             "request": req,
       
    99                             "path": req.path,
       
   100                             "controller": controller,
       
   101                             "config": self.appli.repo.config,
       
   102                         })
    96                     except cubicweb.NoSelectableObject:
   103                     except cubicweb.NoSelectableObject:
    97                         log.warn("WARNING '%s' unauthorized request", req.path)
   104                         log.warn("WARNING '%s' unauthorized request", req.path)
    98                         raise httpexceptions.HTTPUnauthorized(
   105                         raise httpexceptions.HTTPUnauthorized(
    99                             req._('not authorized'))
   106                             req._('not authorized'))
   100 
   107