Skip to main content
July 13, 2009
Answered

ColdFusion Logs

  • July 13, 2009
  • 1 reply
  • 1032 views

Hi, I was wondering what information CF logs? Is there a log that will tell me every page that was accessed, at what time, the queries ran on the page, the IP of the user, the exact URL passed, the user who was logged in, etc... I need to log this data for security purposes.

If not, is there a way I can set CF to log this information? It's very important!

Thanks!

    This topic has been closed for replies.
    Correct answer JR__Bob__Dobbs-qSBHQ2

    Some of information you're looking for can be logged by your web server, IIS or Apache:
    * what URL was requested
    * the user, depending on the authentication method used
    * the user's IP address

    For logging of database queries you have a couple of options:

    1. Some CF datasources, such as Oracle or Microsoft SQL Server, have a "Log Activity" option that may be helpful to use.  Note that I have not used this feature nor does it appear to be well documented.
    2. Use the logging or profiling features, if any, of your database server.  I suggest posting this question to a forum specific to your database version.

    1 reply

    JR__Bob__Dobbs-qSBHQ2Correct answer
    Inspiring
    July 13, 2009

    Some of information you're looking for can be logged by your web server, IIS or Apache:
    * what URL was requested
    * the user, depending on the authentication method used
    * the user's IP address

    For logging of database queries you have a couple of options:

    1. Some CF datasources, such as Oracle or Microsoft SQL Server, have a "Log Activity" option that may be helpful to use.  Note that I have not used this feature nor does it appear to be well documented.
    2. Use the logging or profiling features, if any, of your database server.  I suggest posting this question to a forum specific to your database version.

    July 13, 2009

    OK, thanks. I'll look into that. Hopefully I can find a way to get CF to pull the information, so I can view it as a page via my Admin panel.

    July 20, 2009

    In IIS you can have it output the logs into an ODBC database. Create a SQL Server DB and set up the DSN pointing to it, then you set up that DB in your CF Admin. Like you mentioned, I'm able to query the logs and display them in my Admin section. I prefer it to running a log application program to be honest.