Which function is responsible for sending a custom message to the system log?
Correct answer
B. syslog()
13 views
B. syslog()
13 views
The function responsible for sending a custom message to the system log in PHP is the syslog() function. This function is part of the syslog logging system in PHP and allows you to send log messages to the system logger.
<?php openlog("myScript", LOG_PID, LOG_USER); // Sending a custom log message syslog(LOG_INFO, "This is a custom log message"); closelog(); ?>
Not sure why the answer is B? Ask here and get an explanation.