1 Reply Latest reply on Jun 18, 2009 4:25 AM by aubweb

    How to log flex -> cfc communication




      I am working on a Flex application using remote objects and CF8.

      I have dozen of cfc's with few functions inside.

      What I want to realize is to log (in a database) every function called with their passed arguments (from flex) and the userid.


      for example here's the information I want to store :



      05/28/2009 10:05myUser1folder1/sales.cfcgetMainNumbers

      - dptName : 'test'

      - area : 'test'

      - company : 'test'

      05/28/2009 10:07User2folder2/home.cfcgetUserList-area : 'test'



      is it possible to do without changing the flex application and only using coldfusion (application.cfc + events)


      I am already able to retrieve current connected users.

      using this script (the authentication is done in a cfm page then it redirects to the Flex app with the userid)  :



      <cfparam name="application.sessionTracker" default="#StructNew()#">


      <cfset objLog = {

           userid = URL.value,

           in = now(),

           area = area

      } />


      <cfset dummy = structInsert(



           objLog, true)>  




      Here's the structure of the different directories :


      - FTP root

           - my Flex app folder

                . application.cfm

                . index.cfm   

                . myapp.swf


           - cfc's folder

                - folder 1

                     . file1.cfc

                     . file2.cfc



      I hope that my question is clear