154 VALUE ident, opt, fac;
335 return rb_sprintf(
"<#%s: opened=true, ident=\"%s\", options=%d, facility=%d, mask=%d>",
350 #define define_syslog_shortcut_method(pri, name) \
351 static VALUE mSyslog_##name(int argc, VALUE *argv, VALUE self) \
353 syslog_write((pri), argc, argv); \
454 #define rb_define_syslog_option(c) \
455 rb_define_const(mSyslogOption, #c, INT2NUM(c))
478 #define rb_define_syslog_facility(c) \
479 rb_define_const(mSyslogFacility, #c, INT2NUM(c))
553 #define rb_define_syslog_level(c, m) \
554 rb_define_const(mSyslogLevel, #c, INT2NUM(c)); \
555 rb_define_module_function(mSyslog, #m, mSyslog_##m, -1)
#define rb_define_syslog_facility(c)
void rb_define_singleton_method(VALUE obj, const char *name, VALUE(*func)(ANYARGS), int argc)
Defines a singleton method for obj.
VALUE rb_f_sprintf(int, const VALUE *)
static VALUE mSyslog_isopen(VALUE self)
static VALUE mSyslog_reopen(int argc, VALUE *argv, VALUE self)
VALUE rb_funcall(VALUE, ID, int,...)
Calls a method.
void rb_raise(VALUE exc, const char *fmt,...)
static VALUE mSyslogLevel
static void syslog_write(int pri, int argc, VALUE *argv)
void rb_include_module(VALUE klass, VALUE module)
static VALUE mSyslog_instance(VALUE self)
static VALUE mSyslog_ident(VALUE self)
VALUE rb_gv_get(const char *)
int rb_block_given_p(void)
static const char * syslog_ident
static VALUE mSyslog_close(VALUE self)
static int syslog_facility
void rb_define_module_function(VALUE module, const char *name, VALUE(*func)(ANYARGS), int argc)
Defines a module function for module.
VALUE rb_sprintf(const char *format,...)
static VALUE mSyslogMacros
static VALUE mSyslog_facility(VALUE self)
int rb_scan_args(int argc, const VALUE *argv, const char *fmt,...)
static int syslog_options
static VALUE mSyslogFacility
const char * rb_class2name(VALUE)
void rb_extend_object(VALUE obj, VALUE module)
static VALUE mSyslogOption
VALUE rb_ensure(VALUE(*b_proc)(ANYARGS), VALUE data1, VALUE(*e_proc)(ANYARGS), VALUE data2)
static VALUE mSyslog_inspect(VALUE self)
VALUE rb_define_module_under(VALUE outer, const char *name)
#define rb_define_syslog_option(c)
static VALUE mSyslogConstants
#define rb_define_syslog_level(c, m)
static VALUE mSyslog_set_mask(VALUE self, VALUE mask)
static VALUE mSyslog_log(int argc, VALUE *argv, VALUE self)
#define SafeStringValue(v)
static VALUE mSyslogMacros_LOG_UPTO(VALUE mod, VALUE pri)
static VALUE mSyslog_open(int argc, VALUE *argv, VALUE self)
VALUE rb_define_module(const char *name)
#define define_syslog_shortcut_method(pri, name)
static VALUE mSyslogMacros_included(VALUE mod, VALUE target)
void rb_define_method(VALUE klass, const char *name, VALUE(*func)(ANYARGS), int argc)
VALUE rb_str_new2(const char *)
static VALUE mSyslog_get_mask(VALUE self)
static VALUE mSyslog_options(VALUE self)
static VALUE mSyslogMacros_LOG_MASK(VALUE mod, VALUE pri)