dropr::log PHP Method

log() public static method

currently only syslog is implemented
public static log ( string $message, integer $level = LOG_INFO )
$message string
$level integer
    public static function log($message, $level = LOG_INFO)
    {
        if ($level <= self::$logLevel) {
            self::getLogger()->log($message, $level);
        }
    }

Usage Example

Example #1
0
 public function __construct(dropr_Client_Storage_Abstract $storage)
 {
     $ipcPath = DIRECTORY_SEPARATOR . 'tmp' . DIRECTORY_SEPARATOR . 'droprIpc' . DIRECTORY_SEPARATOR;
     $channelName = $ipcPath . hash('sha1', realpath($storage->getDsn()));
     $this->storage = $storage;
     if (!is_dir($ipcPath)) {
         mkdir($ipcPath, 0777, true);
     }
     if (!is_file($channelName)) {
         if (!posix_mknod($channelName, 0666)) {
             throw new Exception("could not mknod {$channelName}!");
         }
     }
     dropr::log("doing ftok({$channelName})", LOG_DEBUG);
     $this->ipcChannel = msg_get_queue(ftok($channelName, '*'));
 }
All Usage Examples Of dropr::log