Google Mail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Problem Getting Doctrine_Event objects and values from Record Listener for Logging Purposes
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Follow-up To:
Add Cc | Add Follow-up to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers that you hear
 
Routy  
View profile   Translate to Translated (View Original)
 More options 4 Nov, 23:03
From: Routy <nickro...@gmail.com>
Date: Wed, 4 Nov 2009 15:03:11 -0800 (PST)
Local: Wed 4 Nov 2009 23:03
Subject: Problem Getting Doctrine_Event objects and values from Record Listener for Logging Purposes
Hello,

I created a class extending Doctrine_Record_Listener but can't seem to
get the values I am looking for.

I have attached the listener to the specific connection I am wanting
to log Insert/Update/Delete queries done by certain users in our
system.

My Class:

class App_Log_Database extends Doctrine_Record_Listener
{
    public function postInsert(Doctrine_Event $event)
    {
        echo 'inserting a record ...';
    }

    public function postUpdate(Doctrine_Event $event)
    {

            $invoker = $event->getInvoker();
            echo  $event->getName();
            echo  $event->getQuery();
            print_r($event->getParams());

            if($event->getElapsedSecs()) {

               echo "yay";

            } else {
                echo "Updating row for user..."
            }
    }

    public function postDelete(Doctrine_Event $event)
    {
        echo 'deleting a record...';
    }

}

The result when posting the form to update:

update recordArray ( ) Updating row for user...

What my end goal is to save the query and parameters of each query and
the user that performed the query into a database log. The more
information I can gather about the query the better. Why am I having
such a hard time getting the variables and the query?

Please reply as I am running out of ideas....

Thanks!

Nick

http://blog.routydesign.com


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Routy  
View profile   Translate to Translated (View Original)
 More options 5 Nov, 16:06
From: Routy <nickro...@gmail.com>
Date: Thu, 5 Nov 2009 08:06:55 -0800 (PST)
Local: Thurs 5 Nov 2009 16:06
Subject: Re: Problem Getting Doctrine_Event objects and values from Record Listener for Logging Purposes
Any thoughts?

On Nov 4, 4:03 pm, Routy <nickro...@gmail.com> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Routy  
View profile   Translate to Translated (View Original)
 More options 6 Nov, 19:46
From: Routy <nickro...@gmail.com>
Date: Fri, 6 Nov 2009 11:46:56 -0800 (PST)
Local: Fri 6 Nov 2009 19:46
Subject: Re: Problem Getting Doctrine_Event objects and values from Record Listener for Logging Purposes
On Nov, 6

    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Routy  
View profile   Translate to Translated (View Original)
 More options 6 Nov, 19:47
From: Routy <nickro...@gmail.com>
Date: Fri, 6 Nov 2009 11:47:30 -0800 (PST)
Local: Fri 6 Nov 2009 19:47
Subject: Re: Problem Getting Doctrine_Event objects and values from Record Listener for Logging Purposes
On Nov, 6

    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google