I read this page http://doc.silverstripe.org/framework/en/3.1/changelogs/3.1.0 where it says:
Security: Require ADMIN for ?flush=1
Flushing the various manifests (class, template, config) is performed through a GET parameter (flush=1). Since this action requires more server resources than normal requests, it can facilitate denial-of-service attacks.
To prevent this, main.php now checks and only allows the flush parameter in the following cases:
The environment is in "dev mode"
A user is logged in with ADMIN permissions
An error occurs during startup
-------------------------------
Since flush work on my site I assume it is in dev mode, however its config file doesnt have any 'environment dev' line: how is that possible?
Regarding logs, is it enough to add SS_Log::add_writer(new SS_LogFileWriter(BASE_PATH . '/mylog.log'), SS_Log::WARN); to config.php ?
Thanks
Update:
attached you can see the error that I wanna log.
It appears when I sync files but I cant understand what is that caused by since everything looks working ok anyway.
I checked the files table in the db and it gets created just fine
Re. logs, they do work if set as following so this is solved:
SS_Log::add_writer(new SS_LogEmailWriter('mymail@gmail.com'), SS_Log::WARN, '<=');
SS_Log::add_writer(new SS_LogEmailWriter('mymail@gmail. com'), SS_Log::ERR);
and here is the warning:
[Warning] file_get_contents() [function.file-get-contents]: Filename cannot be empty
/home/mhd-01/..../framework/view/SSViewer.php:1035