12 static SV *ident_svptr;
14 #include "const-c.inc"
16 MODULE = Sys::Syslog PACKAGE = Sys::Syslog
28 croak("Your vendor has not defined the Sys::Syslog macro LOG_FAC");
42 croak("Your vendor has not defined the Sys::Syslog macro LOG_PRI");
55 RETVAL = LOG_MAKEPRI(fac,pri);
57 croak("Your vendor has not defined the Sys::Syslog macro LOG_MAKEPRI");
69 RETVAL = LOG_MASK(pri);
71 croak("Your vendor has not defined the Sys::Syslog macro LOG_MASK");
83 RETVAL = LOG_UPTO(pri);
85 croak("Your vendor has not defined the Sys::Syslog macro LOG_UPTO");
93 openlog_xs(ident, option, facility)
102 ident_svptr = newSVsv(ident);
103 ident_pv = SvPV(ident_svptr, len);
104 openlog(ident_pv, option, facility);
107 syslog_xs(priority, message)
112 syslog(priority, "%s", message);
125 if (SvREFCNT(ident_svptr))
126 SvREFCNT_dec(ident_svptr);