View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001948 | Xdebug | Uncategorized | public | 2021-02-18 12:06 | 2021-10-04 09:32 |
Reporter | derick | Assigned To | derick | ||
Priority | high | Severity | feature | Reproducibility | have not tried |
Status | closed | Resolution | fixed | ||
Product Version | 3.0.2 | ||||
Target Version | 3.1dev | Fixed in Version | 3.1.0 | ||
Summary | 0001948: Do not redirect warning and error messages to PHP's error log if an Xdebug log is active | ||||
Description | Keep critical errors still going to PHP's error log though. | ||||
Tags | No tags attached. | ||||
Operating System | |||||
PHP Version | 8.0.0-8.0.4 | ||||
|
I suspect something like this in log.h would do the job in src/lib/log.c: <code> |
|
I created a draft PR at https://github.com/xdebug/xdebug/pull/726, I have some work to do today before I can circle back to it but I see that several existing test cases need to be updated before I set it ready to review |
|
That code is not right, as it would no longer redirect these messages to the PHP error log even if the xdebug log isn't configured. Also, please read https://github.com/xdebug/xdebug/blob/master/CONTRIBUTING.rst and stick to the existing coding standards (NO SPACES! ;-) ). |
|
I hadn't realised it used spaces, that's a mistake, likely my editor trying to be clever with a new language. And I did read the contributor document, I actually tried to create a PR several times and removed them because I realised I'd made a mistake with the PR title, the commit message, etc, it was quite stressful. Have you considered an .editorconfig so that this mistake isn't possible? Otherwise I'm unsure how to check if the log file is active, and assumed that checks used elsewhere would do it. In hindsight the check should be moved below the if statement underneath. I used that particular check based off of https://github.com/xdebug/xdebug/blob/5e29284c45cbfdf968e39479687db7913b563d0a/src/lib/log.c#L60-L62, that if the log_file was false then that meant there was no handle open to the logfile. Since xdebug_internal_log is called before xdebug_php_log, log_file would be available if internal logging was possible, and if it had to be intialised it would have been done beforehand |
|
|
|
|
Date Modified | Username | Field | Change |
---|---|---|---|
2021-02-18 12:06 | derick | New Issue | |
2021-02-18 12:06 | derick | Status | new => assigned |
2021-02-18 12:06 | derick | Assigned To | => derick |
2021-02-18 12:24 | tomjn | Note Added: 0005683 | |
2021-02-18 12:44 | tomjn | Note Added: 0005684 | |
2021-02-19 12:21 | derick | Note Added: 0005687 | |
2021-02-19 14:16 | tomjn | Note Added: 0005690 | |
2021-03-17 08:30 | derick | Priority | normal => high |
2021-03-17 08:31 | derick | Relationship added | has duplicate 0001920 |
2021-04-23 15:13 | derick | Note Added: 0005861 | |
2021-04-26 08:23 | derick | Status | assigned => closed |
2021-04-26 08:23 | derick | Resolution | open => fixed |
2021-04-26 08:23 | derick | Fixed in Version | => 3.1dev |
2021-04-26 08:23 | derick | Note Added: 0005862 | |
2021-05-19 12:19 | derick | Relationship added | has duplicate 0001975 |
2021-09-05 16:15 | derick | Fixed in Version | 3.1dev => 3.1.0beta1 |
2021-10-04 09:32 | derick | Fixed in Version | 3.1.0beta1 => 3.1.0 |