Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NFR] FirePHP Log Adapter and Formatter #845

Merged
merged 5 commits into from Jul 15, 2013
Merged

[NFR] FirePHP Log Adapter and Formatter #845

merged 5 commits into from Jul 15, 2013

Conversation

ghost
Copy link

@ghost ghost commented Jul 14, 2013

The idea was taken from the https://github.com/phalcon/incubator/tree/master/Library/Phalcon/Logger.

The adapter is meant to send messages to FireBug with FirePHP extension enabled.

This implementation differs from the incubator's:

  • _initialized and _index properties are static — if by accident the user instantiates two loggers, FirePHP will be very confused;
  • very long messages are split into 5KB chunks so that Firefox be able to read the headers properly.

Bonuses:

  • much shorter version of Phalcon\Logger\Formatter::getTypeString()
  • results returned by json_encode() are always NUL-terminated (otherwise Zend Engine complains loudly if PHP is built with debugging support)

phalcon pushed a commit that referenced this pull request Jul 15, 2013
[NFR] FirePHP Log Adapter and Formatter
@phalcon phalcon merged commit 2705089 into phalcon:1.2.1 Jul 15, 2013
@ghost ghost deleted the logger-firephp branch July 16, 2013 02:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants