Fix ChromePhp logger interface and debug level #3987
Conversation
* | ||
* @param string $line | ||
*/ | ||
public function error($line); | ||
public function log($line); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can only change that interface for ZF3. Can you find another solution?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* | ||
* @param string $line | ||
*/ | ||
public function groupEnd($line); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That said... @xoob -- additions to an interface are not backwards compatible, nor is removing a method (I see you've removed trace
and added group
). Which is problematic, as I'm not sure how we can expose these features otherwise.
My guess is nobody else will implement the interface; they'll likely only ever use the writer we provide. Let me bring this to the community review team to discuss.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@weierophinney Understood, makes perfect sense. I'm not sure why the interface defines a trace()
method though, but I suspect it is by mistake.
The actual ChromePhp
class that is called defines this:
public static function getInstance()
public static function log()
public static function warn()
public static function error()
public static function group()
public static function info()
public static function groupCollapsed()
public static function groupEnd()
public function addSetting($key, $value)
public function addSettings(array $settings)
public function getSetting($key)
Reverted the original fix and made another one that just changes the |
Fix ChromePhp logger interface and debug level
…chromephp Fix ChromePhp logger interface and debug level
The
ChromePhp
log writer logs debug messages as error messages. It looks like the interface was copied fromFirePhp
and not updated.This pull request changes the
ChromePhpInterface
to match the actual class and fixes the log level used for debug messages.