Description

In Zend_Log_Writer_Syslog::facility is defined as string and it is sent to openlog() this way hence openlog()'s 3rd parameter should be long, choosen from the predefined PHP constans LOG*.
I would recommend to use the string with constant($this->_facility) and document that user should specify the constant name to use if required.

Actually, by default, the $_facility parameter is defined to the value of the LOG_USER constant; it's not actually a string, though the docblock reports it as such. You can alter the facility using a setter, but the assumption is that you're passing in one of those constants.

I think one of two things need to happen:
* The $facility property needs to be marked as an integer
* setFacility() needs to check the value against the known LOG* constants.

I made one minor change to the patch, and that was to do the detection of the validFacilities array size within the setFacility() method. This reduces the number of function calls necessary for applications where the facility may be changed multiple times.