protected function _doImportant() {
$log->debug("doing important stuff now");
foreach ($this->import as $moreimportant) {
$log->debug("as I said, important or $moreimportant");
}
$log->debug("finished doing ach so important thing");
}
class Log {
const DEBUGLEVEL=0;
const WARNINGLEVEL = 1;
/*
...
*/
const DEBUGMODE = TRUE;
public function plainWrite($message) {
//smth
}
public function write($message, $level) {
//smth
}
public function debug($message) {
if (self::DEBUGMODE) {
$this->write($message, self::DEBUGLEVEL);
}
}
}
openvpn-туннель (windows, можно и на ubuntu)