Guest User

Untitled

a guest
Aug 14th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. #!/usr/bin/php
  2.  
  3. <?php
  4.  
  5. $log_options = LOG_NDELAY | LOG_PID;
  6. $log_priorities = LOG_ERR | LOG_WARNING | LOG_INFO | LOG_DEBUG;
  7. $log_facility = LOG_LOCAL2;
  8. openlog('test.php', $log_options, $log_facility);
  9.  
  10. syslog(LOG_ERR, 'LOG_ERR -- this is an error');
  11. syslog(LOG_WARNING, 'LOG_WARNING -- this is a warning');
  12. syslog(LOG_INFO, 'LOG_INFO -- this is info');
  13. syslog(LOG_DEBUG, 'LOG_DEBUG -- this is debug info');
  14. ?>
  15.  
  16. Aug 14 14:03:28 localhost test.php[32774]: LOG_ERR -- this is an error
  17. Aug 14 14:03:28 localhost test.php[32774]: LOG_WARNING -- this is a warning
  18. Aug 14 14:03:28 localhost test.php[32774]: LOG_INFO -- this is info
Add Comment
Please, Sign In to add comment