Method: Syslog.close

Defined in:
syslog.c

.closeObject

Closes the syslog facility. Raises a runtime exception if it is not open.



56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# File 'syslog.c', line 56

static VALUE mSyslog_close(VALUE self)
{
    if (!syslog_opened) {
        rb_raise(rb_eRuntimeError, "syslog not opened");
    }

    closelog();

    xfree((void *)syslog_ident);
    syslog_ident = NULL;
    syslog_options = syslog_facility = syslog_mask = -1;
    syslog_opened = 0;

    return Qnil;
}