Skip to content

Commit

Permalink
added error_log option in plain parameter + readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
hazardland committed Nov 17, 2016
1 parent ce1eea4 commit 65a31a8
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,17 @@ debug ($test, date('Y-m-d H:i:s').": Save plain text to file ", "./test.log");

And lastly if you are using subl-protocol plugin for sublime (https://github.com/thecotne/subl-protocol) you can unfold debug backtrace and with one click in browser jump on the specific file and line in sublime text editor:

![](./demo/php-debug-sublime-protocol.png)
![](./demo/php-debug-sublime-protocol.png)

To debug in error log use 'error_log' in 3d parameter:
````PHP
debug ($_GET,'GET','error_log');
````
To view error log nicely formated use:
````
tail -f error_log | grep --line-buffered "\n--" | sed "s/\\\n/\\n/g"
````
Or if you want all other error log messages:
````
tail -f error_log | sed "s/\\\n/\\n/g"
````

0 comments on commit 65a31a8

Please sign in to comment.