Skip to content
Log incoming FRAPI requests in a way that's non-obstrusive
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Frapi Logger Plugin

Third party services like and are services we usually strongly recommend. However some people like to manage all this because sending data to or going through a third party provider is sometimes an area of concern.

Moreover, we strongly recommend you use an asynchroneous logging solution like rsyslog-mysql or some sort of async logging system that will never impact the performance of your API. Using this plugin might have very negative implications on your API's performances.

This very simple plugin will allow you to log the incoming requests to a simple database table so you can have your own analytics running in the background or even implemented in the administration interface if you want to (You have to do that though).


In order to get the Logger running you have to do a few things. Follow the steps below and you might be running in no time.

  1. If it doesn't exist already, create a Library directory in your FRAPI CUSTOM_PATH.
  2. In that Library directory, create the following directories Frapi/Plugins/Logger. This can be done by doing mkdir -p Frapi/Plugins/Logger. Alternatively you can do: cd FRAPI_CUSTOM_PATH; mkdir Library; cd Library; git clone git:// .. The Dot at the end is important.
  3. If you used git clone in step 2, skip this step and go to step 4. Copy the content of the Frapi/Plugins/Logger/ in this repository to the one you created in your FRAPI install.
  4. Import the install/setup.sql database file into your database (preferably with the same settings you set in your FRAPI admin)
  5. Add the following to your custom/AllFiles.php



  6. Now when you generate new actions in the FRAPI administration panel, change the class it extends to Frapi_Plugins_Logger_Base so it looks like

    class Action_Name extends Frapi_Plugins_Logger_Base implements Frapi_Action_Interface {...}

You can make changes to the logger/base if you need different formats.

Something went wrong with that request. Please try again.