我目前正在将PHP客户端用于docusign(https://github.com/docusign/docusign-php-client),每次调用DocuSign\eSign\Api\EnvelopesApi::getDocument
时,都会收到类似以下的消息
[INFO] Written ##### byte to /tmp/######. Please move the file to a proper folder or delete the temp file after processing.
这显然是由该行(https://github.com/docusign/docusign-php-client/blob/master/src/ObjectSerializer.php#L260)触发的
error_log("[INFO] Written $byte_written byte to $filename. Please move the file to a proper folder or delete the temp file after processing.\n", 3, Configuration::getDefaultConfiguration()->getDebugFile());
我尝试了所有我能想到的所有事情,使用@,将error_reporting设置为0,将debugfile设置为
php://stderr
,设置为/dev/null
,但都无济于事。我在自定义Symfony命令的上下文中使用此方法(如果有什么用)。
最佳答案
SDK会将这些文本作为引用消息输出到系统日志。我了解您不愿看到它的愿望。 I have filed an issue against the SDK about this.
同时,我建议您git fork SDK并注释掉该行。
关于php - 下载文件时抑制错误消息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40386390/