wa0x6e / Cake-Resque

Resque plugin for CakePHP : for creating background jobs that can be processed offline later
MIT License
159 stars 56 forks source link

Error/Debug-Log problems #55

Open johannesnagl opened 10 years ago

johannesnagl commented 10 years ago

Hi @kamisama!

Thx for your nice work - we're having the CakeResque in production since couple of months now and love the way how our app is now possible to scale again :)

Unfortunately, we do have a problem with missing errors/warnings!

In the Main-CakePHP App we define the following in core.php:

App::uses('SentryErrorHandler', 'Sentry.Lib');

Configure::write('Sentry', array(
  'production_only' => true, // true is default value -> no error in sentry when debug
  'PHP' => array(
    'server' => 'https://XXX:YYY@app.getsentry.com/ZZ'
  )
));

Configure::write('Error', array(
  'handler' => 'SentryErrorHandler::handleError',
  'level' => E_ALL & ~E_DEPRECATED,
  'trace' => true
));

as well as

  Configure::write('Exception', array(
    'handler' => 'SentryErrorHandler::handleException',
    'renderer' => 'ExceptionRenderer',
    'log' => true
  ));

All errors/warnings within our app are therefore forwarded to getsentry (a saas-error-logging service).

Unfortunately, all errors/warnings, which occur directly within a Shell/Worker-Process, are only written to debug/error.log on disc, but not forwared to sentry.

Do you know, if we need to set the error/exception-handler again in the CakeResque Plugin/Worker-Setup?

(for sentry, we're using this excellent CakePHP Plugin: https://github.com/Sandreu/cake-sentry)

wa0x6e commented 10 years ago

What kind of errors are you referring to ? Application errors or PHP errors (PHP warning/errors, unrelated to the app logic) ?

Errors captured by the debug/error.log on disc are PHP level errors/warning.

johannesnagl commented 10 years ago

i'm referring to php errors. ("use of undefined variable XY, …")