★ wanayoo — archive 1999 http://fr.php.net/manual/hu/function.openlog.phpNouvelle recherche | Portail wanayoo
PHP Tuesday, March 20, 2001  
downloads | documentation | faq | support | reporting bugs | links 

search for in the  

lookup:
PHP KézikönyvPHP Kézikönyv
NetworkNetwork
 checkdnsrrcheckdnsrr
 closelogcloselog
 debugger_offdebugger_off
 debugger_ondebugger_on
 define_syslog_variablesdefine_syslog_variables
 fsockopenfsockopen
 gethostbyaddrgethostbyaddr
 gethostbynamegethostbyname
 gethostbynamelgethostbynamel
 getmxrrgetmxrr
 getprotobynamegetprotobyname
 getprotobynumbergetprotobynumber
 getservbynamegetservbyname
 getservbyportgetservbyport
 ip2longip2long
 long2iplong2ip
 openlogopenlog
 pfsockopenpfsockopen
 socket_get_statussocket_get_status
 socket_set_blockingsocket_set_blocking
 socket_set_timeoutsocket_set_timeout
 syslogsyslog

previouslong2ip
pfsockopennext

Last updated: Sat, 17 Mar 2001
view this page in English | Brazilian Portuguese | Czech | Dutch | French | German | Hungarian | Italian | Japanese | Korean | Spanish | Plain HTML

openlog

(PHP 3, PHP 4 )

openlog -- Open connection to system logger

Description

int openlog (string ident, int option, int facility)

Openlog() opens a connection to the system logger for a program. The string ident is added to each message. Values for option and facility are given below. The option argument is used to indicate what loggin options will be used when generating a log message. The facility argument is used to specify what type of program is logging the message. This allows you to specify (in your machine's syslog configuration) how messages coming from different facilities will be handled. The use of openlog() is optional. It will automatically be called by syslog() if necessary, in which case ident will default to false.

Táblázat 1. Openlog() Options

ConstantDescription
LOG_CONS if there is an error while sending data to the system logger, write directly to the system console
LOG_NDELAY open the connection to the logger immediately
LOG_ODELAY (default) delay openning the connection until the first message is logged
LOG_PERRORprint log message also to standard error
LOG_PIDinclude PID with each message
You can use one or more of this options. When using multiple options you need to OR them, i.e. to open the connection immediately, write to the consoloe and include the PID in each message, you will use: LOG_CONS | LOG_NDELAY | LOG_PID

Táblázat 2. Openlog() Facilities

ConstantDescription
LOG_AUTH security/authorization messages (use LOG_AUTHPRIV instead in systems where that constant is defined)
LOG_AUTHPRIVsecurity/authorization messages (private)
LOG_CRONclock daemon (cron and at)
LOG_DAEMONother system daemons
LOG_KERNkernel messages
LOG_LOCAL0 ... LOG_LOCAL7reserved for local use
LOG_LPRline printer subsystem
LOG_MAILmail subsystem
LOG_NEWSUSENET news subsystem
LOG_SYSLOGmessages generated internally by syslogd
LOG_USERgeneric user-level messages
LOG_UUCPUUCP subsystem

See also define_syslog_variables(), syslog() and closelog().

previouslong2ip
pfsockopennext

Last updated: Sat, 17 Mar 2001
add note | about notes

show source | credits | mirror sites:  

Copyright © 1998-2001 The PHP Group
All rights reserved.
This mirror generously provided by: L'Université Michel de Montaigne Bordeaux III
Last updated: Tue Mar 20 11:02:45 2001 MET