You could do the following:
in mysite/_config.php
SS_Log::add_writer(new SS_LogFileWriter('silverstripe.log'), SS_Log::WARN, '>');
in your code:
SS_Log::log("Dammit, an issue with variable ".$var, SS_Log::WARN);
More at http://doc.silverstripe.com/framework/en/topics/error-handling
Also reading the code in framework/dev/Log.php will give you more insight on how priorities work.
PS: ensure to define 'silverstripe.log' in a folder writable by the apache user