.\" -*- coding: UTF-8 -*- '\" t .\" Written Feb 1994 by Steve Greenland (stevegr@neosoft.com) .\" and Copyright 2001, 2017 Michael Kerrisk .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" Updated 1999.12.19 by Karl M. Hegbloom .\" .\" Updated 13 Oct 2001, Michael Kerrisk .\" Added description of vsyslog .\" Added descriptions of LOG_ODELAY and LOG_NOWAIT .\" Added brief description of facility and option arguments .\" Added CONFORMING TO section .\" 2001-10-13, aeb, minor changes .\" Modified 13 Dec 2001, Martin Schulze .\" Modified 3 Jan 2002, Michael Kerrisk .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH syslog 3 "5 Febrero 2023" "Páginas de manual de Linux 6.03" .SH NOMBRE closelog, openlog, syslog, vsyslog \- envían mensajes a la bitácora (log) del sistema .SH BIBLIOTECA Biblioteca Estándar C (\fIlibc\fP, \fI\-lc\fP) .SH SINOPSIS .nf \fB#include \fP .PP \fBvoid openlog(const char *\fP\fIident\fP\fB, int \fP\fIopción\fP\fB, int \fP\fIfacilidad\fP\fB);\fP \fBvoid syslog(int \fP\fIprioridad\fP\fB, const char *\fP\fIformato\fP\fB, ...);\fP \fBvoid closelog(void);\fP .PP \fBvoid vsyslog(int \fP\fIprioridad\fP\fB, const char *\fP\fIformato\fP\fB, va_list \fP\fIap\fP\fB);\fP .fi .PP .RS -4 Requisitos de Macros de Prueba de Características para glibc (véase \fBfeature_test_macros\fP(7)): .RE .PP \fBvsyslog\fP(): .nf A partir de glibc 2.19: _DEFAULT_SOURCE glibc 2.19 y anteriores: _BSD_SOURCE .fi .SH DESCRIPCIÓN .SS openlog() \fBopenlog\fP() abre una conexión para una determinada aplicación a la bitácora del equipo. .PP The string pointed to by \fIident\fP is prepended to every message, and is typically set to the program name. If \fIident\fP is NULL, the program name is used. (POSIX.1\-2008 does not specify the behavior when \fIident\fP is NULL.) .PP The \fIoption\fP argument specifies flags which control the operation of \fBopenlog\fP() and subsequent calls to \fBsyslog\fP(). The \fIfacility\fP argument establishes a default to be used if none is specified in subsequent calls to \fBsyslog\fP(). The values that may be specified for \fIoption\fP and \fIfacility\fP are described below. .PP .\" The use of \fBopenlog\fP() is optional; it will automatically be called by \fBsyslog\fP() if necessary, in which case \fIident\fP will default to NULL. .SS "syslog() y vsyslog()" \fBsyslog\fP() generates a log message, which will be distributed by \fBsyslogd\fP(8). .PP The \fIpriority\fP argument is formed by ORing together a \fIfacility\fP value and a \fIlevel\fP value (described below). If no \fIfacility\fP value is ORed into \fIpriority\fP, then the default value set by \fBopenlog\fP() is used, or, if there was no preceding \fBopenlog\fP() call, a default of \fBLOG_USER\fP is employed. .PP The remaining arguments are a \fIformat\fP, as in \fBprintf\fP(3), and any arguments required by the \fIformat\fP, except that the two\-character sequence \fB%m\fP will be replaced by the error message string \fIstrerror\fP(\fIerrno\fP). The format string need not include a terminating newline character. .PP .\" La función \fBvsyslog\fP() hace la misma tarea que \fBsyslog\fP() con la diferencia de que acepta un conjunto de argumentos que han sido obtenidos usando las macros de \fBstdarg\fP(3) para listas de argumentos variables. .SS closelog() .\" \fBcloselog\fP() cierra el descriptor de archivo que se esté usando para escribir en el la bitácora del sistema. El empleo de \fBcloselog()\fP es opcional. .SS "Valores para \fIoption\fP" The \fIoption\fP argument to \fBopenlog\fP() is a bit mask constructed by ORing together any of the following values: .TP 15 \fBLOG_CONS\fP Escribe directamente en la consola del sistema si hay un error mientras se está enviando algo al registrador del sistema. .TP \fBLOG_NDELAY\fP Open the connection immediately (normally, the connection is opened when the first message is logged). This may be useful, for example, if a subsequent \fBchroot\fP(2) would make the pathname used internally by the logging facility unreachable. .TP \fBLOG_NOWAIT\fP No espera a los procesos hijo que pueden haber sido creados mientras se registraba el mensaje. (La biblioteca C de GNU no crea un proceso hijo, así que esta opción no tiene efecto en Linux.) .TP \fBLOG_ODELAY\fP La opuesta de \fBLOG_NDELAY\fP; la apertura de la conexión se retrasa hasta que se invoca a \fBsyslog\fP(). (Esta es la opción por defecto, y no necesita ser especificada.) .TP \fBLOG_PERROR\fP (Not in POSIX.1\-2001 or POSIX.1\-2008.) Also log the message to \fIstderr\fP. .TP \fBLOG_PID\fP .\" Incluye el PID del invocante con cada mensaje. .SS "Values for \fIfacility\fP" El argumento \fIfacility\fP se emplea para especificar qué tipo de programa está registrando el mensaje. Esto permite que en el fichero de configuración se especifique que mensajes de diferentes programas se manejen de forma distinta. .TP 15 \fBLOG_AUTH\fP mensajes de seguridad o autorización .TP \fBLOG_AUTHPRIV\fP mensajes de seguridad o autorización (privado) .TP \fBLOG_CRON\fP el demonio del reloj (\fBcron\fP y \fBat\fP) .TP \fBLOG_DAEMON\fP demonios del sistema con valor de `facility' separado .TP \fBLOG_FTP\fP demonio de ftp .TP \fBLOG_KERN\fP .\" LOG_KERN has the value 0; if used as a facility, zero translates to: .\" "use the default facility". kernel messages (these can't be generated from user processes) .TP \fBLOG_LOCAL0\fP a \fBLOG_LOCAL7\fP reservados para uso local .TP \fBLOG_LPR\fP subsistema de impresora de línea (de impresión) .TP \fBLOG_MAIL\fP subsistema de correo .TP \fBLOG_NEWS\fP subsistema de tablón de anuncios USENET News .TP \fBLOG_SYSLOG\fP mensajes generados internamente por \fBsyslogd\fP(8) .TP \fBLOG_USER\fP (predeterminado) mensajes genéricos del nivel de usuario .TP \fBLOG_UUCP\fP .\" subsistema de UUCP .SS "Values for \fIlevel\fP" Esto determina la importancia del mensaje. Los niveles son, en orden de importancia decreciente: .TP 15 \fBLOG_EMERG\fP el sistema está inutilizable .TP \fBLOG_ALERT\fP debe tomarse una acción correctora inmediatamente .TP \fBLOG_CRIT\fP condiciones críticas .TP \fBLOG_ERR\fP condiciones de error .TP \fBLOG_WARNING\fP condiciones de advertencia .TP \fBLOG_NOTICE\fP condición normal, pero significativa .TP \fBLOG_INFO\fP mensaje informativo .TP \fBLOG_DEBUG\fP mensaje del nivel de depuración .PP La función \fBsetlogmask\fP(3) puede ser empleada para restringir el registro solamente en niveles determinados. .SH ATRIBUTOS Para obtener una explicación de los términos usados en esta sección, véase \fBattributes\fP(7). .ad l .nh .TS allbox; lbx lb lb l l l. Interfaz Atributo Valor T{ \fBopenlog\fP(), \fBcloselog\fP() T} Seguridad del hilo Multi\-hilo seguro T{ \fBsyslog\fP(), \fBvsyslog\fP() T} Seguridad del hilo MT\-Safe env locale .TE .hy .ad .sp 1 .SH ESTÁNDARES Las funciones \fBopenlog\fP(), \fBcloselog\fP() y \fBsyslog\fP() (pero no \fBvsyslog\fP()) están especificadas en SUSv2, POSIX.1\-2001 y POSIX.1\-2008. .PP POSIX.1\-2001 especifica solamente los valores \fBLOG_USER\fP y \fBLOG_LOCAL*\fP para \fIfacility\fP. Sin embargo, salvo la excepción de \fBLOG_AUTHPRIV\fP y \fBLOG_FTP\fP, los otros valores de \fIfacility\fP aparecen en la mayoría de sistemas UNIX. .PP .\" .SH HISTORY .\" A .\" .BR syslog () .\" function call appeared in 4.2BSD. .\" 4.3BSD documents .\" .BR openlog (), .\" .BR syslog (), .\" .BR closelog (), .\" and .\" .BR setlogmask (). .\" 4.3BSD-Reno also documents .\" .BR vsyslog (). .\" Of course early v* functions used the .\" .I .\" mechanism, which is not compatible with .\" .IR . El valor \fBLOG_PERROR\fP para \fIoption\fP no está especificado por POSIX.1\-2001 o POSIX.1\-2008, pero está disponible en la mayoría de versiones de Unix. .SH NOTAS The argument \fIident\fP in the call of \fBopenlog\fP() is probably stored as\-is. Thus, if the string it points to is changed, \fBsyslog\fP() may start prepending the changed string, and if the string it points to ceases to exist, the results are undefined. Most portable is to use a string constant. .PP Never pass a string with user\-supplied data as a format, use the following instead: .PP .in +4n .EX syslog(priority, "%s", string); .EE .in .SH "VÉASE TAMBIÉN" \fBjournalctl\fP(1), \fBlogger\fP(1), \fBsetlogmask\fP(3), \fBsyslog.conf\fP(5), \fBsyslogd\fP(8) .PP .SH TRADUCCIÓN La traducción al español de esta página del manual fue creada por Gerardo Aburruzaga García , Miguel Pérez Ibars y Marcos Fouces . .PP Esta traducción es documentación libre; lea la .UR https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3 .UE o posterior con respecto a las condiciones de copyright. No existe NINGUNA RESPONSABILIDAD. .PP Si encuentra algún error en la traducción de esta página del manual, envíe un correo electrónico a .MT debian-l10n-spanish@lists.debian.org .ME .