Ruby: ext/syslog/syslog.c File Reference

Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)

Macros | Functions
syslog.c File Reference
`#include "ruby/ruby.h"`
`#include "ruby/util.h"`
`#include <syslog.h>`

Go to the source code of this file.

## Macros
#define | define_syslog_shortcut_method(pri, name)
#define | rb_define_syslog_option(c) rb_define_const(mSyslogOption, #c, INT2NUM(c))
#define | rb_define_syslog_facility(c) rb_define_const(mSyslogFacility, #c, INT2NUM(c))
#define | rb_define_syslog_level(c, m)

## Functions
void | Init_syslog (void)

## Macro Definition Documentation

## ◆ define_syslog_shortcut_method

#define define_syslog_shortcut_method | ( |  | pri,
|  |  | name
| ) |  |

Value:
static VALUE mSyslog_##name(int argc, VALUE *argv, VALUE self) \
{ \
syslog_write((pri), argc, argv); \
\
return self; \
}
name
const char * name
Definition: nkf.c:208
argc
int argc
Definition: ruby.c:240
argv
char ** argv
Definition: ruby.c:241
VALUE
unsigned long VALUE
Definition: value.h:38

Definition at line 342 of file syslog.c.

## ◆ rb_define_syslog_facility

#define rb_define_syslog_facility | ( |  | c | ) | rb_define_const(mSyslogFacility, #c, INT2NUM(c))

## ◆ rb_define_syslog_level

#define rb_define_syslog_level | ( |  | c,
|  |  | m
| ) |  |

Value:
rb_define_const(mSyslogLevel, #c, INT2NUM(c)); \
rb_define_module_function(mSyslog, #m, mSyslog_##m, -1)
rb_define_const
void rb_define_const(VALUE, const char *, VALUE)
Definition: variable.c:3150
INT2NUM
#define INT2NUM
Definition: int.h:43

## ◆ rb_define_syslog_option

#define rb_define_syslog_option | ( |  | c | ) | rb_define_const(mSyslogOption, #c, INT2NUM(c))

## Function Documentation

## ◆ Init_syslog()

void Init_syslog | ( | void |  | ) |

Definition at line 416 of file syslog.c.

References debug, err, rb_define_method, rb_define_module(), rb_define_module_function, rb_define_module_under(), rb_define_singleton_method, rb_define_syslog_facility, rb_define_syslog_level, rb_define_syslog_option, rb_funcall(), rb_include_module(), and rb_intern().