0

我们遇到了一些问题,即在交易更新时未调用出站 Webhook。有人可以建议如何启用 Bitrix 登录并检查在 Webhook 调用表单 Bitrix On-prem 安装期间是否抛出任何错误?

4

1 回答 1

2
  1. 签入 .settings.php 文件中的“exception_handling”

例子:

'exception_handling' => array (
  'value' => array (
      'debug' => false, // disables error output to screen
       // ошибки для вывода в лог
      'handled_errors_types' => E_ALL & ~E_NOTICE & ~E_STRICT & ~E_WARNING,
      'exception_errors_types' => E_ALL & ~E_NOTICE & ~E_WARNING & ~E_STRICT & ~E_COMPILE_WARNING,
      'ignore_silence' => true,
      'assertion_throws_exception' => true,
      'assertion_error_type' => 256,
      'log' => array (
          'settings' => array (
              'file' => "logs/bx_error/" . date("Y-m-d") . ".log",
              'log_size' => 1000000, // ~ 1Mb per file
          ),
      ),
  ),
  'readonly' => true,
),
  1. 您可以将功能记录到您的挂钩中。

例子:

function writeToLog($data, $title = '') {
 $log = "\n------------------------\n";
 $log .= date("Y.m.d G:i:s") . "\n";
 $log .= (strlen($title) > 0 ? $title : 'DEBUG') . "\n";
 $log .= print_r($data, 1);
 $log .= "\n------------------------\n";
 file_put_contents(getcwd() . '/hook.log', $log, FILE_APPEND);
 return true;
}

文档参考:https ://helpdesk.bitrix24.com/open/5838415/

于 2019-12-09T10:29:46.843 回答