在线文档教程
PHP
联网 | Networking

define_syslog_variables

define_syslog_variables

(PHP 4, PHP 5 < 5.4.0)

define_syslog_variables — Initializes all syslog related variables

Description

void define_syslog_variables ( void )

Initializes all variables used in the syslog functions.

Return Values

No value is returned.

VariableConstant equalMeaningNotes
$LOG_EMERGLOG_EMERGSystem is unusable
$LOG_ALERTLOG_ALERTImmediate action required
$LOG_CRITLOG_CRITCritical conditions
$LOG_ERRLOG_ERR
$LOG_WARNINGLOG_WARNING
$LOG_NOTICELOG_NOTICE
$LOG_INFOLOG_INFO
$LOG_DEBUGLOG_DEBUG
$LOG_KERNLOG_KERN
$LOG_USERLOG_USERGenetic user level
$LOG_MAILLOG_MAILLog to email
$LOG_DAEMONLOG_DAEMONOther system daemons
$LOG_AUTHLOG_AUTH
$LOG_SYSLOGLOG_SYSLOGNot available on Netware
$LOG_LPRLOG_LPR
$LOG_NEWSLOG_NEWSUsenet newNot available on HP-UX
$LOG_CRONLOG_CRONNot available on all platforms
$LOG_AUTHPRIVLOG_AUTHPRIVNot available on AIX
$LOG_LOCAL0LOG_LOCAL0Not available on Windows and Netware
$LOG_LOCAL1LOG_LOCAL1Not available on Windows and Netware
$LOG_LOCAL2LOG_LOCAL2Not available on Windows and Netware
$LOG_LOCAL3LOG_LOCAL3Not available on Windows and Netware
$LOG_LOCAL4LOG_LOCAL4Not available on Windows and Netware
$LOG_LOCAL5LOG_LOCAL5Not available on Windows and Netware
$LOG_LOCAL6LOG_LOCAL6Not available on Windows and Netware
$LOG_LOCAL7LOG_LOCAL7Not available on Windows and Netware
$LOG_PIDLOG_PID
$LOG_CONSLOG_CONS
$LOG_ODELAYLOG_ODELAY
$LOG_NDELAYLOG_NDELAY
$LOG_NOWAITLOG_NOWAITNot available on BeOS
$LOG_PERRORLOG_PERRORNot available on AIX

Warning

This function has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 5.4.0.

Examples

Example #1 define_syslog_variables() example

<?php // Check if syslog variables already is defined if(!get_cfg_var('define_syslog_variables')) {     define_syslog_variables( } // Open the log openlog('', $LOG_ODELAY, $LOG_MAIL | $LOG_USER // Continue script ... ?>

Changelog

VersionDescription
5.4.0This function was removed from PHP.
5.3.0This function now throws an E_DEPRECATED notice.

See Also

  • openlog() - Open connection to system logger

  • syslog() - Generate a system log message

  • closelog() - Close connection to system logger

← closelog

dns_check_record →

© 1997–2017 The PHP Documentation Group

Licensed under the Creative Commons Attribution License v3.0 or later.

https://secure.php.net/manual/en/function.define-syslog-variables.php