Module: Syslog::Macros
| Relationships & Source Files | |
| Defined in: | ext/syslog/syslog.c |
Class Method Summary
Instance Method Summary
-
LOG_MASK(priority_level) ⇒ priority_mask
Generates a mask bit for a priority level.
-
LOG_UPTO(priority_level) ⇒ priority_mask
Generates a mask value for priority levels at or below the level specified.
Class Method Details
.included(target)
[ GitHub ]# File 'ext/syslog/syslog.c', line 398
static VALUE mSyslogMacros_included(VALUE mod, VALUE target)
{
rb_extend_object(target, mSyslogMacros);
return mod;
}
Instance Method Details
LOG_MASK(priority_level) ⇒ priority_mask
Generates a mask bit for a priority level. See Syslog#mask=
# File 'ext/syslog/syslog.c', line 382
static VALUE mSyslogMacros_LOG_MASK(VALUE mod, VALUE pri)
{
return INT2FIX(LOG_MASK(NUM2INT(pri)));
}
LOG_UPTO(priority_level) ⇒ priority_mask
Generates a mask value for priority levels at or below the level specified. See Syslog#mask=
# File 'ext/syslog/syslog.c', line 393
static VALUE mSyslogMacros_LOG_UPTO(VALUE mod, VALUE pri)
{
return INT2FIX(LOG_UPTO(NUM2INT(pri)));
}