Run Window when running application error_log is firing but not writing to log
strangest thing errors are not logged to log file when I run the app inside PS. They do fire but they do not write to the log. The error_log does write to the log file if it is run through normal use of the app.
Is there a key combo that turns this off or some setting that I have accidentally changed?
Please sign in to leave a comment.
Do you mean the Apache remote log?
If so, PhpStorm has nothing to do with whether the log is written or not.
How do you start the app within PhpStorm exactly? Maybe you're running it in the CLI mode?
>Do you mean the Apache remote log?
Most likely PHP's native function: http://uk3.php.net/manual/en/function.error-log.php
@Kevin
How do you launch your app? Is that a web app or some CLI script?
In any case -- check phpinfo() output for that environment -- maybe it's configured differently there (e.g. disabled logging .. or it logs into a different target etc -- http://www.php.net/manual/en/errorfunc.configuration.php).
It may also be some permission issue (if you are logging into a file).
Hi thank you for your responses. I am inside WordPress and using PHP's error_log (http://php.net/manual/en/function.error-log.php) I will click on the run menu item or the actual test and select run which will open up another window and output from the methods/functions etc.
the output used to write to debug.log in my wp-content folder when I would test code like this and it would also output that error to the screen. Now it only outputs the error to that screen with nothing being written to the log.
I have tested this and if I run the php inside of its normal environment it does log the error inside wp-content/debug.log
I was wondering why this stopped working and can only think that I turned logging off for the run environment?? not sure though I think it is strange that it used to write and now it doesn't.
Do you run it externally as "php script.php"?
Could you provide us with a sample code to reproduce this please?