Log SQL Query

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MorningStar
    Junior Member
    • Feb 2018
    • 12

    Log SQL Query

    Is it posible to activate log for all sql queries?
  • Kurt
    Member
    • Jan 2018
    • 37

    #2
    I have the same question. I have seen suggestions elsewhere that say "set logger level in data/config.php to 'DEBUG'" but that does not work for me. It actually doesn't increase the logging at all which may be another issue.

    I tried adding print statements in a variety of places but haven't been able to find a place where it actually puts the query together (I'm not a PHP developer). In my situation I'm trying to override getDuplicateWhereClause() for a few entities but it's not following the logic as I would expect (it's counting the same entity as a duplicate even though Record.php seems to have code that should prevent that). So looking at the SQL it's putting together would be helpful in debugging...

    Comment

    • tanya
      Senior Member
      • Jun 2014
      • 4308

      #3
      EspoCRM – Open Source CRM Application. Contribute to espocrm/espocrm development by creating an account on GitHub.

      add here $GLOBALS['log']->debug($sql); and save
      Last edited by tanya; 07-31-2019, 08:50 AM.

      Comment

      Working...