Log message #4198287

# At Username Text
# Aug 15th 2019, 11:15 spriz like what kind of business if you can't tell exactly which? :)
# Aug 15th 2019, 11:15 alexdd55976 hey.. just saw the shop is still running
# Aug 15th 2019, 11:15 spriz what you guys doing? :)
# Aug 15th 2019, 11:14 neothermic parts of the code are from 2010 :)
# Aug 15th 2019, 11:14 neothermic @alexdd55976 it was originally a 1.2 codebase ;)
# Aug 15th 2019, 11:14 alexdd55976 i built a shop system on it...
# Aug 15th 2019, 11:13 spriz I've seen people proxy requests with the web server to 3.x slowly for URLs
# Aug 15th 2019, 11:13 neothermic only if they're 100% new properties. The platform is stuck on 2.x for now
# Aug 15th 2019, 11:13 alexdd55976 you should have tried 1.x :)
# Aug 15th 2019, 11:13 spriz I guess you already write all new things in 3.x no?
# Aug 15th 2019, 11:13 challgren Yep, 2.x though allowed you to do some stupid things at times
# Aug 15th 2019, 11:13 neothermic so when you've got ~500k SLoC... that's not upgrading quickly :)
# Aug 15th 2019, 11:13 spriz Ah, I'd believe so. Never used 2.x though
# Aug 15th 2019, 11:12 neothermic no, 3.x is far more complex than 2.x
# Aug 15th 2019, 11:12 spriz length of the book? :O
# Aug 15th 2019, 11:12 neothermic this is part of why we're not yet on 3.x :)
# Aug 15th 2019, 11:11 challgren Yeah not too much to it
# Aug 15th 2019, 11:11 neothermic :)
# Aug 15th 2019, 11:11 spriz Wow the 2.x book is short! :)
# Aug 15th 2019, 11:11 spriz suggests to put it at `app/Lib/AppError.php`
# Aug 15th 2019, 11:10 spriz that looks like it: https://book.cakephp.org/2.0/en/development/errors.html#creating-your-own-error-handler
# Aug 15th 2019, 11:10 neothermic setErrorHandlers seems that it might do the trick
# Aug 15th 2019, 11:10 neothermic mm, I'd also need to work out how to force cake to use them
# Aug 15th 2019, 11:09 spriz It's ugly - I know :) but it'll work
# Aug 15th 2019, 11:09 spriz make a class that overwrites `handleException` and `handlError` and remove those parts about `$stderr->write(__d('cake_console', "<error>%s Error:</error> %s\n", $name, $message));
# Aug 15th 2019, 11:08 spriz Ah yes! https://github.com/cakephp/cakephp/blob/2.x/lib/Cake/Console/ConsoleErrorHandler.php#L55
# Aug 15th 2019, 11:07 neothermic handleException/handleError
# Aug 15th 2019, 11:07 spriz or something alike
# Aug 15th 2019, 11:07 spriz don't you have something that has `$this->_stderr->write($message);` ?
# Aug 15th 2019, 11:07 spriz yeah I should have scrolled up
# Aug 15th 2019, 11:06 neothermic nope, did say it was 2.x :)
# Aug 15th 2019, 11:06 spriz my bad :)
# Aug 15th 2019, 11:06 spriz I forgot
# Aug 15th 2019, 11:06 spriz Oh yikes, you are not on 3.x ......... :)
# Aug 15th 2019, 11:06 neothermic `ConsoleErrorHandler` doesn't seem to have a `_displayException` :S
# Aug 15th 2019, 11:05 spriz `/src/Console/SilentConsoleErrorHandler`
# Aug 15th 2019, 11:04 neothermic where'd you create SilentConsoleErrorHandler ? :slightly_smiling_face:
# Aug 15th 2019, 11:04 spriz YMMV
# Aug 15th 2019, 11:04 spriz and changed from `(new ConsoleErrorHandler(Configure::read('Error')))->register();` to `(new SilentConsoleErrorHandler(Configure::read('Error')))->register();` in `bootstrap.php`
# Aug 15th 2019, 11:03 spriz I extended `ConsoleErrorHandler`, changed `_displayException` to just `return;` and it was enough for me :slightly_smiling_face:
# Aug 15th 2019, 11:02 spriz with cake log stuff going to stdio