The Debug Log

Applies to: Jamroom 7.0+ Last verified: 2026-10-24
  • Where it is

    ACP > Dashboard > Activity Log, then the Debug Log tab. The Error Log tab next to it shows PHP errors. On the server, the debug log is the file data/logs/debug_log.

    Normally it's empty. Entries come from developers' fdebug() calls, and from options that log to it, such as fdebug=true on a {jrCore_list}.

  • Writing to it

    fdebug() takes any values and writes them to the Debug Log, with the time, the URL and the user:

    fdebug($_post);
    fdebug('reached the save step', $_data);
  • Label what you log, so you can tell entries apart:

    fdebug(array(
        'where' => 'xxFoo_save_listener',
        '_data' => $_data,
        '_args' => $_args
    ));
  • Remove the calls when you're done: on a busy site they fill the log quickly.

  • Limiting what's logged

    Call these before fdebug(), for example at the top of your function:

    • fdebug_only_ip('203.0.113.5'): log only requests from your IP address
    • fdebug_ignore_ajax(): skip AJAX requests
    • fdebug_ignore_images(): skip image requests
  • Reading an entry

    An entry shows the values as PHP prints arrays. Look for what's missing or wrong. For example, a list's search condition logged as:

    [search] => Array ( [0] => _item_id in )
  • has no values after in: the template passed an empty variable, so check the variable's name and where it's set.

  • Query logging

    Developer Tools can also log database work: Slow Query Log (to the Activity Log), Track Query Counts (shown under Tools > Database Query Counts) and Log Database Queries (to data/logs/sql_query_log). Use them on a development site only.

Tags