FFY00 / phpdesktop

Automatically exported from code.google.com/p/phpdesktop
0 stars 0 forks source link

error_log does not write to system logs #50

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Enable logging, show_console = true, log_level = "INFO", log_file = 
"debug.log".
2. Include an error_log() statement in www/index.php.

   <?php error_log("Here I am!"); ?>

3. Start application.

What is the expected output? What do you see instead?

Should see ERROR in log, but it does not show up in the file or console. 

What version of the product are you using? On what operating system?

php-desktop-msieVv10, Win7.

Please provide any additional information below.

Changing log_level affects the verbosity of system logs, but does not appear to 
enable my own logs.

Original issue reported on code.google.com by dbingham...@gmail.com on 9 Oct 2013 at 5:10

GoogleCodeExporter commented 8 years ago
If the log_type == 3, and $destination is provided, then error_log DOES work. 
Example:

   error_log("You messed up!", 3, "/var/tmp/my-errors.log");

Refer to http://www.php.net/manual/en/function.error-log.php for more info.

Original comment by dbingham...@gmail.com on 9 Oct 2013 at 5:21

GoogleCodeExporter commented 8 years ago
The "log_file" option in settings.json is for application level logging.

PHP logging is a different thing and should not be mistaken with the logging set
through the settings.json file.

To set php log file set the "error_log" option in php.ini:
http://www.php.net/manual/en/errorfunc.configuration.php#ini.error-log

I've updated the Settings wiki page and put a note for the log_file option:
https://code.google.com/p/phpdesktop/wiki/Settings

Original comment by czarek.t...@gmail.com on 9 Oct 2013 at 6:08