首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Bitrix在哪里生成日志?

Bitrix在哪里生成日志?
EN

Stack Overflow用户
提问于 2019-10-19 22:56:26
回答 1查看 375关注 0票数 0

在交易更新中无法调用出站Webhook时,我们遇到一些问题。有人可以建议如何启用登录Bitrix,并检查在Webhook调用Bitrix On-prem安装过程中是否抛出任何错误吗?

EN

回答 1

Stack Overflow用户

发布于 2019-12-09 18:29:47

  1. Check in 'exception_handling‘in file .settings.php

示例:

代码语言:javascript
复制
'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. 您可以将函数记录到您的挂钩中。

示例:

代码语言:javascript
复制
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/

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/58464911

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档