joomla/joomla-platform — pull request #1638 by pasamio (2012-10-25 06:24:49+00:00)
Title: Support configurable facilities for JLogLoggerSyslog

At the moment JLogLoggerSyslog is hard coded to user the "user" log facility. For Windows this is the only log facility available to the PHP syslog command however for every other system with standard syslog support there are alternative options.

This change permits specifying other syslog facilities through a `sys_facility` option. The facilities supported are listed here:
http://us1.php.net/manual/en/function.openlog.php

An example of code which utilises this feature could look like this:
```php
// Set up syslog
JLog::addLogger(
array(
'logger' => 'syslog',
'sys_ident' => 'jplatform_app',
'sys_facility' => LOG_LOCAL7
),
JLog::ERROR,
array('databasequery')
);
```

That example logs to `LOCAL7` any database query error with a custom identifier.