-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1834 from sjinks/issue-1483
Switch off labels in Phalcon\Logger\Formatter\Firephp
- Loading branch information
Showing
3 changed files
with
92 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,36 @@ | ||
--TEST-- | ||
Phalcon\Logger\Adapter\Firephp: Error - https://github.com/phalcon/incubator/issues/44 | ||
\Phalcon\Logger\Formatter\Firephp without backtrace - https://github.com/phalcon/cphalcon/issues/1483 | ||
--SKIPIF-- | ||
<?php include('skipif.inc'); ?> | ||
--FILE-- | ||
<?php | ||
$formatter = new \Phalcon\Logger\Formatter\Firephp(); | ||
|
||
assert($formatter->getShowBacktrace() === true); | ||
assert($formatter->labelsEnabled() === true); | ||
|
||
$formatter->setShowBacktrace(false); | ||
|
||
$logger = new \Phalcon\Logger\Adapter\Firephp(""); | ||
$logger->setFormatter($formatter); | ||
$logger->log("This is a message"); | ||
$logger->log("This is an error", \Phalcon\Logger::ERROR); | ||
$logger->error("This is another error"); | ||
$logger->warning(str_repeat('x', 5000)); | ||
|
||
$formatter->enableLabels(false); | ||
$logger->log("This is a message"); | ||
$logger->log("This is an error", \Phalcon\Logger::ERROR); | ||
?> | ||
--EXPECTHEADERS-- | ||
X-Wf-Protocol-1: http://meta.wildfirehq.org/Protocol/JsonStream/0.2 | ||
X-Wf-1-Structure-1: http://meta.firephp.org/Wildfire/Structure/FirePHP/FirebugConsole/0.1 | ||
X-Wf-1-Plugin-1: http://meta.firephp.org/Wildfire/Plugin/FirePHP/Library-FirePHPCore/0.3 | ||
X-Wf-1-1-1-1: 47|[{"Type":"LOG","Label":"This is a message"},[]]| | ||
X-Wf-1-1-1-2: 48|[{"Type":"ERROR","Label":"This is an error"},[]]| | ||
X-Wf-1-1-1-3: 53|[{"Type":"ERROR","Label":"This is another error"},[]]| | ||
X-Wf-1-1-1-1: 47|[{"Type":"LOG","Label":"This is a message"},""]| | ||
X-Wf-1-1-1-2: 48|[{"Type":"ERROR","Label":"This is an error"},""]| | ||
X-Wf-1-1-1-3: 53|[{"Type":"ERROR","Label":"This is another error"},""]| | ||
X-Wf-1-1-1-4: 5031|[{"Type":"WARN","Label":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx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