How about an 'Errors' icon to the far right of the file tabs? It makes use of a new setting which defines the domains error logs dir plus any extras, such as maybe your own error-log.txt if you wish.
It could check for changes in these log files every 1 sec or so and if it finds changes, the Errors icon highlights, you can click it and it shows the new errors? (You'd need to create a virtual dir to domains error log dir of course to allow PHP to scan for changes there).
Kind of recent/live error reporting?
Matt
Matt
There's a grey bug icon (perhaps a Beetle) to the far right of the file tabs. Hover your mouse over it and it displays 'Bug reporting not active' and when clicked on 'Setup bug reporting in settings'.
So you go to settings and under a new setting 'Bug reporting paths' can add a comma seperated list of error log file paths but here we'll just set up one: '/var/domain/public/errors/error.log'. When you click Update you'll go back to the editor view and the bug icon is flashing yellow. Hover over it and it displays 'Issue with bug reporting path'. Click this and it displays 'Path issue with /var/domain/public/errors/error.log - unavailable'.
This is because we're half way through our setup. We now setup a virtual dir from /var/domain/errors to /var/domain/public/errors on the server and the bug icon stops flashing yellow as we've mapped the errors dir to within the public dir and the path we setup in settings is now accessble & OK. The bug icon turns green to indicate it's live & working.
Now it's found the file and also established the last error line in that file. So we start coding and viewing our work in a browser window, but it generates errors. ICEcoders bug tracking system notices (via say a 5 sec interval check) that there's 3 new errors in the error.log file. The bug icon turns red, we click it and it shows the 3 errors. The bug turns green again as it's informed you of these latest bugs and reset itself, making a note of the last line again (so the reporting continues again from that point now).
What do you think?
Matt
Seems it falls into 3 main categories - file() that can use up a lot of memory, tail() which isn't cross platform and fseek() which is the ideal solution.
Was good to see that a 10k and 10mb file get handled by fseek in < 1ms just the same. Hopefully it'll be the same no matter the size (100mb, 1gb, etc).
Sounds like the way to go?
Matt
Pencils down!