Provided by: manpages-es-dev_4.13-4_all bug

NOMBRE

       closelog, openlog, syslog, vsyslog - envían mensajes al registrador del sistema

SINOPSIS

       #include <syslog.h>

       void openlog(const char *ident, int option, int facility);
       void syslog(int priority, const char *format, ...);
       void closelog(void);

       void vsyslog(int priority, const char *format, va_list ap);

   Requisitos de Macros de Prueba de Características para glibc (véase feature_test_macros(7)):

       vsyslog():
           Since glibc 2.19:
               _DEFAULT_SOURCE
           Glibc 2.19 and earlier:
               _BSD_SOURCE

DESCRIPCIÓN

   openlog()
       openlog()  opens a connection to the system logger for a program.

       The  string pointed to by ident is prepended to every message, and is typically set to the
       program name.  If ident is NULL, the program name is used.  (POSIX.1-2008 does not specify
       the behavior when ident is NULL.)

       The  option  argument  specifies  flags  which  control  the  operation  of openlog()  and
       subsequent calls to syslog().  The facility argument establishes a default to be  used  if
       none  is  specified in subsequent calls to syslog().  The values that may be specified for
       option and facility are described below.

       The use of openlog()  is optional;  it  will  automatically  be  called  by  syslog()   if
       necessary, in which case ident will default to NULL.

   syslog() y vsyslog()
       syslog()  generates a log message, which will be distributed by syslogd(8).

       The  priority  argument  is  formed  by  ORing together a facility value and a level value
       (described below).  If no facility value is ORed into priority, then the default value set
       by  openlog()   is  used,  or,  if  there  was  no preceding openlog()  call, a default of
       LOG_USER is employed.

       The remaining arguments are a format, as in printf(3), and any arguments required  by  the
       format,  except  that  the two-character sequence %m will be replaced by the error message
       string strerror(errno).   The  format  string  need  not  include  a  terminating  newline
       character.

       La  función  vsyslog() hace la misma tarea que syslog() con la diferencia de que acepta un
       conjunto de argumentos que han sido obtenidos usando las macros de stdarg(3)  para  listas
       de argumentos variables.

   closelog()
       closelog()   closes the file descriptor being used to write to the system logger.  The use
       of closelog()  is optional.

   Values for option
       The option argument to openlog()  is a bit mask constructed by ORing together any  of  the
       following values:

       LOG_CONS       Escribe  directamente en la consola del sistema si hay un error mientras se
                      está enviando algo al registrador del sistema.

       LOG_NDELAY     Open the connection immediately (normally, the connection  is  opened  when
                      the  first  message  is  logged).   This  may  be useful, for example, if a
                      subsequent chroot(2)  would  make  the  pathname  used  internally  by  the
                      logging facility unreachable.

       LOG_NOWAIT     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.)

       LOG_ODELAY     La  opuesta  de LOG_NDELAY; la apertura de la conexión se retrasa hasta que
                      se invoca a syslog(). (Esta es la opción por defecto,  y  no  necesita  ser
                      especificada.)

       LOG_PERROR     (Not in POSIX.1-2001 or POSIX.1-2008.)  Also log the message to stderr.

       LOG_PID        Include the caller's PID with each message.

   Values for facility
       El  argumento facility 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.

       LOG_AUTH       mensajes de seguridad o autorización

       LOG_AUTHPRIV   mensajes de seguridad o autorización (privado)

       LOG_CRON       el demonio del reloj (cron y at)

       LOG_DAEMON     demonios del sistema con valor de `facility' separado

       LOG_FTP        demonio de ftp

       LOG_KERN       kernel messages (these can't be generated from user processes)

       LOG_LOCAL0 a LOG_LOCAL7
                      reservados para uso local

       LOG_LPR        subsistema de impresora de línea (de impresión)

       LOG_MAIL       subsistema de correo

       LOG_NEWS       subsistema de tablón de anuncios USENET News

       LOG_SYSLOG     mensajes generados internamente por syslogd(8)

       LOG_USER (predeterminado)
                      mensajes genéricos del nivel de usuario

       LOG_UUCP       subsistema de UUCP

   Values for level
       Esto  determina  la  importancia  del  mensaje.  Los  niveles son, en orden de importancia
       decreciente:

       LOG_EMERG      el sistema está inutilizable

       LOG_ALERT      debe tomarse una acción correctora inmediatamente

       LOG_CRIT       condiciones críticas

       LOG_ERR        condiciones de error

       LOG_WARNING    condiciones de advertencia

       LOG_NOTICE     condición normal, pero significativa

       LOG_INFO       mensaje informativo

       LOG_DEBUG      mensaje del nivel de depuración

       La función setlogmask(3)  puede ser empleada para  restringir  el  registro  solamente  en
       niveles determinados.

ATRIBUTOS

       Para obtener una explicación de los términos usados en esta sección, véase attributes(7).

       ┌──────────────────────┬────────────────────┬────────────────────┐
       │InterfazAtributoValor              │
       ├──────────────────────┼────────────────────┼────────────────────┤
       │openlog(), closelog() │ Seguridad del hilo │ Multi-hilo seguro  │
       ├──────────────────────┼────────────────────┼────────────────────┤
       │syslog(), vsyslog()   │ Seguridad del hilo │ MT-Safe env locale │
       └──────────────────────┴────────────────────┴────────────────────┘

CONFORME A

       Las funciones openlog(), closelog() y syslog() (pero no vsyslog())  están especificadas en
       SUSv2, POSIX.1-2001 y POSIX.1-2008.

       POSIX.1-2001 especifica solamente los valores LOG_USER y LOG_LOCAL*  para  facility.   Sin
       embargo,  salvo  la  excepción  de  LOG_AUTHPRIV  y LOG_FTP, los otros valores de facility
       aparecen en la mayoría de sistemas UNIX.

       El valor LOG_PERROR para option no está especificado por POSIX.1-2001 o POSIX.1-2008, pero
       está disponible en la mayoría de versiones de Unix.

NOTAS

       The  argument  ident  in  the  call  of openlog()  is probably stored as-is.  Thus, if the
       string it points to is changed, syslog()  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.

       Never pass a string with user-supplied data as a format, use the following instead:

           syslog(priority, "%s", string);

VÉASE TAMBIÉN

       journalctl(1), logger(1), setlogmask(3), syslog.conf(5), syslogd(8)

COLOFÓN

       Esta página es parte de la versión 5.10 del proyecto Linux man-pages. Puede encontrar  una
       descripción  del  proyecto, información sobre cómo informar errores y la última versión de
       esta página en https://www.kernel.org/doc/man-pages/.

TRADUCCIÓN

       La traducción al español de esta página del  manual  fue  creada  por  Gerardo  Aburruzaga
       García <gerardo.aburruzaga@uca.es> y Miguel Pérez Ibars <mpi79470@alu.um.es>

       Esta  traducción  es  documentación  libre;  lea  la  GNU General Public License Version 3
       ⟨https://www.gnu.org/licenses/gpl-3.0.html⟩ o posterior con respecto a las condiciones  de
       copyright.  No existe NINGUNA RESPONSABILIDAD.

       Si  encuentra  algún  error  en  la  traducción de esta página del manual, envíe un correo
       electrónico a debian-l10n-spanish@lists.debian.org ⟨⟩.