Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/php
- <?php
- $log_options = LOG_NDELAY | LOG_PID;
- $log_priorities = LOG_ERR | LOG_WARNING | LOG_INFO | LOG_DEBUG;
- $log_facility = LOG_LOCAL2;
- openlog('test.php', $log_options, $log_facility);
- syslog(LOG_ERR, 'LOG_ERR -- this is an error');
- syslog(LOG_WARNING, 'LOG_WARNING -- this is a warning');
- syslog(LOG_INFO, 'LOG_INFO -- this is info');
- syslog(LOG_DEBUG, 'LOG_DEBUG -- this is debug info');
- ?>
- Aug 14 14:03:28 localhost test.php[32774]: LOG_ERR -- this is an error
- Aug 14 14:03:28 localhost test.php[32774]: LOG_WARNING -- this is a warning
- Aug 14 14:03:28 localhost test.php[32774]: LOG_INFO -- this is info
Add Comment
Please, Sign In to add comment