xref: /netbsd-src/share/man/man9/log.9 (revision 11a6dbe72840351315e0652b2fc6663628c84cad)
1*11a6dbe7Smartin.\"     $NetBSD: log.9,v 1.10 2008/04/30 13:10:58 martin Exp $
251096e42Sexplorer.\"
351096e42Sexplorer.\" Copyright (c) 1997 The NetBSD Foundation, Inc.
451096e42Sexplorer.\" All rights reserved.
551096e42Sexplorer.\"
651096e42Sexplorer.\" This code is derived from software contributed to The NetBSD Foundation
751096e42Sexplorer.\" by Michael Graff.
851096e42Sexplorer.\"
951096e42Sexplorer.\" Redistribution and use in source and binary forms, with or without
1051096e42Sexplorer.\" modification, are permitted provided that the following conditions
1151096e42Sexplorer.\" are met:
1251096e42Sexplorer.\" 1. Redistributions of source code must retain the above copyright
1351096e42Sexplorer.\"    notice, this list of conditions and the following disclaimer.
1451096e42Sexplorer.\" 2. Redistributions in binary form must reproduce the above copyright
1551096e42Sexplorer.\"    notice, this list of conditions and the following disclaimer in the
1651096e42Sexplorer.\"    documentation and/or other materials provided with the distribution.
1751096e42Sexplorer.\"
1851096e42Sexplorer.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
1951096e42Sexplorer.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
2051096e42Sexplorer.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21516fb1f3Sjtc.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22516fb1f3Sjtc.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
2351096e42Sexplorer.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
2451096e42Sexplorer.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
2551096e42Sexplorer.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
2651096e42Sexplorer.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
2751096e42Sexplorer.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2851096e42Sexplorer.\" POSSIBILITY OF SUCH DAMAGE.
2951096e42Sexplorer.\"
3051096e42Sexplorer.Dd May 12, 1997
3151096e42Sexplorer.Dt LOG 9
32e4c16bfbSgarbled.Os
3351096e42Sexplorer.Sh NAME
3451096e42Sexplorer.Nm log
35c2956b75Senami.Nd log a message from the kernel through the
36c2956b75Senami.Pa /dev/klog
37c2956b75Senamidevice
3851096e42Sexplorer.Sh SYNOPSIS
39472351e1Swiz.In sys/syslog.h
4051096e42Sexplorer.Ft void
4151096e42Sexplorer.Fo "log"
4251096e42Sexplorer.Fa "int level"
4351096e42Sexplorer.Fa "const char *format"
4451096e42Sexplorer.Fa "..."
4551096e42Sexplorer.Fc
4651096e42Sexplorer.Sh DESCRIPTION
4751096e42SexplorerThe
4851096e42Sexplorer.Fn log
4951096e42Sexplorerfunction allows the kernel to send messages to user processes listening
501a56a0bbSjeremyon
511a56a0bbSjeremy.Pa /dev/klog .
521a56a0bbSjeremyUsually
5351096e42Sexplorer.Xr syslogd 8
541a56a0bbSjeremymonitors
551a56a0bbSjeremy.Pa /dev/klog
561a56a0bbSjeremyfor these messages and writes them to a log file.
5751096e42Sexplorer.Pp
5851096e42SexplorerAll messages are logged using facility
5951096e42Sexplorer.Dv LOG_KERN .
6051096e42SexplorerSee
6151096e42Sexplorer.Xr syslog 3
6251096e42Sexplorerfor a listing of log levels.
6351096e42Sexplorer.Sh SEE ALSO
6451096e42Sexplorer.Xr syslog 3 ,
656f4ce5dfSmsaitoh.Xr syslogd 8
66