Skip to content

Commit 0f8a61a

Browse files
Log worker errors to syslog
1 parent ef7bc23 commit 0f8a61a

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# php-job-server
22

3-
Brainstorming:
3+
## Errors
4+
5+
Workers' PHP errors are logged to syslog (i.e. /var/log/syslog).
6+
7+
## Brainstorming:
48

59
Blocking i/o (perfectly synchronized):
610

src/Crusse/JobServer/worker_process.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
if ( php_sapi_name() !== 'cli' )
44
exit( 1 );
55

6+
ini_set( 'log_errors', '1' );
7+
ini_set( 'error_log', 'syslog' );
68
error_reporting( E_ALL );
79

810
require_once dirname( __FILE__ ) .'/Worker.php';

0 commit comments

Comments
 (0)