Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-19822

Improve query debugging in CiviCRM.log file?

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 4.7.14
    • Fix Version/s: None
    • Component/s: Core CiviCRM
    • Labels:
      None
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Needs Funding
    • Verified?:
      No

      Description

      I'd like to make a suggest/bring to attention the way queries are showing in the CiviCRM.log file please.

      Attached (debugging.txt) is a 'typical' entry from the CiviCRM.log. The content of the error is irrelevant, other than the fact it contains a MySQL query.

      I'm wondering why the same truncated MySQL query is shown no less than 5 times in the log file, yet I cannot see the whole query. I realize some queries are far too large to show in their entirety, yet showing more than 255 characters (x5) would be definitely more helpful.

      In order to see what the full query was, I would have to
      define( 'CIVICRM_DEBUG_LOG_QUERY', 'backtrace' );
      and then attempt to:
      1. replicate the issue
      2. dig through a lot of other queries to find the one I was after
      ...rather than simply looking at the .log file for the error and query as it already occurred.

        Attachments

        1. debugging.txt
          4 kB
          Stoob
        2. query_log.txt
          3 kB
          Stoob

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              stoob Stoob
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: