It's described in man syslogd
:
/dev/log
The Unix domain socket to from where local syslog messages are read.
You can see yourself that it's used by syslogd
using logger
command for example:
$ strace -f logger a 2>&1 | grep /dev/log
connect(3, {sa_family=AF_UNIX, sun_path="/dev/log"}, 110) = 0
Or lsof
(if available):
$ sudo lsof /dev/log
lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /home/ja/.cache/gvfs
Output information may be incomplete.
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
syslogd 860 root 0u unix 0x0000000003d863fa 0t0 18404 /dev/log type=DGRAM
Notice that there are multiple implementations of syslogd
on various
systems - Slackware for example comes with sysklogd but various
embedded platforms come with their own implementation such as Busybox.
I believe you might also confuse syslog(2)
and syslog(3)
:
$ man -k syslog | grep '^syslog '
syslog (2) - read and/or clear kernel message ring buffer; set console_loglevel
syslog (3) - send messages to the system logger
syslog(2)
is a syscall (also listed in man syscalls
) used by
dmesg
through libc klogctl
API to read and/or clear kernel
message ring buffer while syslog(3)
is used to send messages to
syslogd. These 2 functions are named the same but they are used for
completely different purposes and work differently internally.