Log message #4198248

# At Username Text
# 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
# Aug 15th 2019, 11:02 neothermic oooh, what you do to solve it?
# Aug 15th 2019, 11:02 spriz @neothermic I had the same issue last friday :) :)
# Aug 15th 2019, 10:35 challgren But I feel your pain!
# Aug 15th 2019, 10:35 challgren Or deal with the garbage
# Aug 15th 2019, 10:35 challgren I vote mock it
# Aug 15th 2019, 10:34 neothermic ``` Cakelog::drop('error'); CakeLog::config('error', array( 'engine' => 'File', 'types' => array('emergency', 'alert', 'critical', 'error'), ));```
# Aug 15th 2019, 10:34 neothermic nope
# Aug 15th 2019, 10:33 neothermic hmm
# Aug 15th 2019, 10:33 challgren But then can you reconfigure it to /dev/null?
# Aug 15th 2019, 10:32 neothermic if you drop it, you get an error that there's no handler for that log type
# Aug 15th 2019, 10:32 conehead Or can you get a list of all loggers with `CakeLog::configured` and then unset them via `CakeLog::drop($name)`?
# Aug 15th 2019, 10:29 conehead Well usually it shouldnt at all...that is what mocks are for :P
# Aug 15th 2019, 10:29 neothermic unsure how much cake might explode if I mock CakeLog
# Aug 15th 2019, 10:28 conehead Unfortunately (or fortunately? :)) I do not have a cake 2 setup anymore. But shouldn't it be possible to mock out that darn logger?
# Aug 15th 2019, 10:27 neothermic and neither is setting the Error up to be a file-only log :|
# Aug 15th 2019, 10:26 neothermic aw, and `Cakelog::disable('Error');` is _not_ the answer :)
# Aug 15th 2019, 10:24 challgren Damm
# Aug 15th 2019, 10:23 neothermic nope, still. I put `Configure::write('debug', 0);` after the 'parent::setUp()' in my `setUp` and nada
# Aug 15th 2019, 10:23 challgren *sits on edge of seat*
# Aug 15th 2019, 10:23 challgren Damm
# Aug 15th 2019, 10:23 neothermic oh, wait..
# Aug 15th 2019, 10:22 neothermic well, that didn't work
# Aug 15th 2019, 10:22 challgren Or that
# Aug 15th 2019, 10:22 neothermic ahh, I ponder if I should be running with debug = 0 during testing
# Aug 15th 2019, 10:21 challgren Custom error handler during tests
# Aug 15th 2019, 10:20 neothermic well, no, that only tells me _why_ it's writing to stderr, not how to stop it from doing so :)
# Aug 15th 2019, 10:20 challgren Well that sounds like your fix!
# Aug 15th 2019, 10:18 neothermic and in a console context, that writes to stderr
# Aug 15th 2019, 10:18 neothermic which passes to ErrorHandler::handleError
# Aug 15th 2019, 10:18 neothermic ahh, so I'm using cake's default error handler
# Aug 15th 2019, 10:17 challgren Im trying to see where it even echos out
# Aug 15th 2019, 10:17 neothermic file
# Aug 15th 2019, 10:17 challgren Whats your engine?
# Aug 15th 2019, 10:16 neothermic when you omit the scope, the type is used as the scope
# Aug 15th 2019, 10:15 neothermic `CakeLog::write('error', '<some message>');`
# Aug 15th 2019, 10:15 neothermic it's an error scope, FWIW
# Aug 15th 2019, 10:15 challgren Im trying to recall what I did but I think it was scoping. To fix that
# Aug 15th 2019, 10:14 neothermic so the logging is expected, but it being to the screen.. is not :P
# Aug 15th 2019, 10:14 neothermic I'm intentionally checking paths that generate logs/return false/throw exceptions