Maybe it would be better for AjaxSearch to put its log file in a directory that is writable under all server configurations, such as the assets/cache directory?
My first anwser was to reply: you are right.
But why in cache directory, why not in export directory or an other directory. In fact, I think that’s better to keep this log file related to AjaxSearch in the ajaxSearch directory.
The debug parameter shouldn’t normally used in production. In normal case, for performance reasons, it should be always set to 0. The issue encontered by mmjaeger was due to a wrong initialisation.
So I prefer change the documentation and the code as follow:
- create a directory ajaxSearch/debug
- improve the documentation around the use of this parameter:
Not used for production. The log file is created in the ajaxSearch/debug directory and should be a writable directory.
- when running the snippet, if this directory is not writeable display an alert message: "your ajaxSearch/debug should be writeable".