32#define syslog std_syslog
46 for (
size_t i = 0; i <
ZSTR_LEN(message); ++i) {
47 unsigned char c =
ZSTR_VAL(message)[i];
50 if (((0x20 <= c) && (c <= 0x7e))) {
54 }
else if (c ==
'\n') {
56 syslog(priority,
"%.*s", (
int)sbuf.
len, sbuf.
c);
57 smart_string_reset(&sbuf);
61 static const char xdigits[] =
"0123456789abcdef";
70 syslog(priority,
"%.*s", (
int)sbuf.
len, sbuf.
c);
76 openlog(ident, option, facility);
77 PG(have_called_openlog) = 1;
83 PG(have_called_openlog) = 0;
96 if (!
PG(have_called_openlog)) {
100 va_start(
args, format);
116 if (!
PG(have_called_openlog)) {
120 va_start(
args, format);
126 zend_string_release(fbuf);
syslog(int $priority, string $message)
openlog(string $prefix, int $flags, int $facility)
void php_openlog(const char *ident, int option, int facility)
PHPAPI void php_syslog(int priority, const char *format,...)
PHPAPI void php_syslog_str(int priority, const zend_string *message)
#define PHP_SYSLOG_FILTER_ALL
#define PHP_SYSLOG_FILTER_RAW
#define PHP_SYSLOG_FILTER_ASCII
void vsyslog(int, const char *, va_list ap)
ZEND_API zend_string * zend_vstrpprintf(size_t max_len, const char *format, va_list ap)
struct _zend_string zend_string
#define smart_string_free(s)
#define smart_string_appendc(str, c)
#define smart_string_appendl(str, src, len)