ChromePhp - a PHP library for the Chrome Logger Google Chrome extension

Overview

Overview

ChromePhp is a PHP library for the Chrome Logger Google Chrome extension.

This library allows you to log variables to the Chrome console.

Requirements

  • PHP 5 or later

Installation

  1. Install the Chrome extension from: https://chrome.google.com/extensions/detail/noaneddfkdjfnfdakjjmocngnfkfehhd

  2. Click the extension icon in the browser to enable it for the current tab's domain

  3. Put ChromePhp.php somewhere in your PHP include path

  4. Log some data

    include 'ChromePhp.php';
    ChromePhp::log('Hello console!');
    ChromePhp::log($_SERVER);
    ChromePhp::warn('something went wrong!');

More information can be found here: http://www.chromelogger.com

Comments
  • WordPress theme - headers already sent

    WordPress theme - headers already sent

    Using chromePHP inside a WordPress theme gives me an error of "headers already sent". The problematic line is 385:

    header(self::HEADER_NAME . ': ' . $this->_encode($data));

    Using ChromePHP in WP is no problem as long as wp_head() isn't called. Is there a known workaround?

    opened by jancbeck 7
  • Use self() instead of ChromePhp()

    Use self() instead of ChromePhp()

    To make the class easily renamed (which could be needed for certain autoloaders like it was for me) you have to make this little code edit. Should be self() anyway.

    opened by robclancy 6
  • Add Composer support

    Add Composer support

    Hey Craig!

    I decided to take up on your offer and write a composer.json file for your class! Please check the data and see if everything is OK (especially in the description and authors and such).

    Once you merged my changes, I'll submit the package here. Composer is a dependency manager for PHP, it allows you to manage libraries and packages on a per-project basis. If you still do work with PHP you should check it out. :)

    opened by pcalves 4
  • Auto include on every page

    Auto include on every page

    In php.ini there is a config option called auto_prepend_file.

    http://www.php.net/manual/en/ini.core.php#ini.auto-prepend-file

    If you set that option to something like

    auto_prepend_file = /var/www/ChromePhp.php
    

    Then the script will be automatically be included on every page. It's great for when you're working on a team project and not everyone is using the same environment as you. You don't have to commit ChromePhp to your version control system or leave include statements all over the place. It also just saves time in general.

    Perhaps you could add this information to the Readme? I'm sure a lot of people would benefit from this knowledge.

    opened by beardedlinuxgeek 3
  • Installation problem on latest Chrome

    Installation problem on latest Chrome

    Each time I try to install chromephp I get an error telling me 'Download was not a CRX'. When I try to install it manually I am told 'CRX_MAGIC_NUMBER_INVALID'. I get the crx from my Downloads directory. I am running Mountain Lion with Chrome version: 24.0.1312.56 Thanks

    opened by rock-weld 3
  • PHP Error: Recursion detected

    PHP Error: Recursion detected

    I always get this PHP error when using the script on my site...

    A PHP Error was encountered
    Severity: Warning
    Message: json_encode(): recursion detected
    Filename: libraries/ChromePhp.php
    Line Number: 396
    

    Is there a fix for this?

    opened by bluetidepro 3
  • how can i log after i already sent some data?

    how can i log after i already sent some data?

    I have a php script that streams real-time logs and does some operations based on those logs. Is it ok to log after the headers and part of body have already been sent?

    opened by beppe9000 2
  • Example for ChromePhp::table()

    Example for ChromePhp::table()

    Could you add an example of how to use the table type? Not really understanding how to use it properly... like... what do I pass in there? πŸ€”

    Tried looking in the techspecs and in ChromePhp.php, but yeah... not feeling any wiser πŸ˜•

    opened by Svish 2
  • Warning: Cannot modify header information

    Warning: Cannot modify header information

    Warning: Cannot modify header information - headers already sent by (output started at /Volumes/Backup/Sites/test/chromelogger/index.php:1) in /Volumes/Backup/Sites/test/chromelogger/ChromePhp.php on line 394
    

    just put this

    <?php
       require 'ChromePhp.php';
       ChromePhp::log('Hello console!');
    ?>
    
    opened by MarcoGomesr 2
  • Setting to turn off backtraces

    Setting to turn off backtraces

    We utilize ChromePHP through an abstraction layer that detects the browser before outputting messages. The problem is that the entry point is always the same from our code into the log method so the backtrace that's appended is useless. I'm hoping you can add an option to simply disable the backtrace functionality as we just add this ourselves.

    opened by drakej 2
  • Can I do this?

    Can I do this?

    Can i fork your project and turn this into a helper for codeigniter and release it as a spark?

    With your licence and copyright obviously.

    cheers, Marco

    opened by mpmont 2
Slim-Logger - A stand-alone logger class for use with the Slim Framework

Slim-Logger - A stand-alone logger class for use with the Slim Framework

Josh Lockhart 41 Mar 12, 2022
123Solar is a set of PHP/JS files that make a web logger to monitor your photovoltaic inverter(s)

123Solar is a set of PHP/JS files that make a web logger to monitor your photovoltaic inverter(s). It just need a web server and PHP, no databases are even needed. The philosophy is: To keep it simple, fast, with a low foot print to run on cheap and low powered devices.

null 30 Jan 6, 2023
Simple PHP Logger. Composer package

Basic PHP Logger ?? Simple logger. Composer package.

null 1 Jan 28, 2022
A simple database logger for all outgoing emails sent by Laravel website.

Laravel Email Database Log A simple database logger for all outgoing emails sent by Laravel website.

Shvets Group 136 Jan 4, 2023
Test Doubles for the PSR-3 Logger Interface

PSR Log Test Doubles Test Doubles for the PSR-3 Logger Interface Motivation In PHP world, most people create Test Doubles via PHPUnits mocking framewo

Jeroen De Dauw 2 Oct 7, 2022
temperature-pi: a simple Raspberry Pi based temperature logger using a DS18B20 1-Wire digital temperature sensor, & a local sqlite database

temperature-pi temperature-pi is a simple Raspberry Pi based temperature logger using a DS18B20 1-Wire digital temperature sensor, & a local sqlite da

Ronan Guilloux 23 Dec 27, 2020
πŸ“‘ Laravel HTTP Logger

Logging incoming HTTP requests

The Dragon Code 28 Nov 29, 2022
Allows you to process logs using any PSR-3 compatible logger such as Monolog

Yii 2 PSR Log Target Allows you to process logs using any PSR-3 compatible logger such as Monolog

Alexander Makarov 67 Dec 14, 2022
Robust, composite logger with filtering, formatting, and PSR-3 support

laminas-log ???? Русским Π³Ρ€Π°ΠΆΠ΄Π°Π½Π°ΠΌ ΠœΡ‹, участники Laminas, Ρ€ΠΎΠ΄ΠΈΠ»ΠΈΡΡŒ ΠΈ ΠΆΠΈΠ²Π΅ΠΌ Π² Ρ€Π°Π·Π½Ρ‹Ρ… странах. Π£ ΠΌΠ½ΠΎΠ³ΠΈΡ… ΠΈΠ· нас Π΅ΡΡ‚ΡŒ Π΄Ρ€ΡƒΠ·ΡŒΡ, родствСнники ΠΈ ΠΊΠΎΠ»Π»Π΅Π³ΠΈ ΠΊΠ°ΠΊ Π²

Laminas Project 27 Nov 24, 2022
An effective,fast,stable log extension for PHP

SeasLog An effective,fast,stable log extension for PHP @author Chitao.Gao [[email protected]] Documentation On php.net δΈ­ζ–‡ζ–‡ζ‘£ Synopsis Why use seaslog What

Neeke Gao 76 Sep 28, 2022
PHP logging library that is highly extendable and simple to use.

Analog - Minimal PHP logging library Copyright: (c) 2012-Present Johnny Broadway License: MIT A minimal PHP logging package based on the idea of using

Aband*nthecar 331 Dec 21, 2022
Amazon Web Services CloudWatch Logs Handler for Monolog library

AWS CloudWatch Logs Handler for Monolog Handler for PHP logging library Monolog for sending log entries to AWS CloudWatch Logs service. Before using t

Maksym Leonov 377 Dec 16, 2022
A Simple Logging Class For PHP

KLogger: Simple Logging for PHP A project written by Kenny Katzgrau and Dan Horrigan. About KLogger is an easy-to-use PSR-3 compliant logging class fo

Kenny Katzgrau 964 Dec 11, 2022
AcLog is a simple, zero-dependency PHP package to log activity to files

AcLog is a simple, zero-dependency PHP package to log activity to files. This is not meant for logging errors, this is can be used for logging c

null 2 Sep 9, 2022
High-performance API performing logging for PHP applications into files or SysLog

Logging API Table of contents: About Configuration Binding Points Logging Installation Unit Tests Reference Guide Specifications How Are Log Lines For

Lucian Gabriel Popescu 0 Jan 9, 2022
Laravel logger is an activity event logger for your Laravel or Lumen application

Laravel logger is an activity event logger for your Laravel or Lumen application. It comes out the box with ready to use with dashboard to view your activity. Laravel logger can be added as a middleware or called through a trait. Easily have an Activity Log. This package is easily configurable and customizable. Supports Laravel 5.3, 5.4, 5.5, 5.6, 5.7, 5.8, 6, and 7+

Jeremy Kenedy 475 Dec 22, 2022
Slim-Logger - A stand-alone logger class for use with the Slim Framework

Slim-Logger - A stand-alone logger class for use with the Slim Framework

Josh Lockhart 41 Mar 12, 2022
Handle PHP errors, dump variables, execute PHP code remotely in Google Chrome

PHP Console server library PHP Console allows you to handle PHP errors & exceptions, dump variables, execute PHP code remotely and many other things u

Sergey 1.4k Dec 25, 2022
Laravel 4.* and 5.* service providers to handle PHP errors, dump variables, execute PHP code remotely in Google Chrome

Laravel 4.* service provider for PHP Console See https://github.com/barbushin/php-console-laravel/releases/tag/1.2.1 Use "php-console/laravel-service-

Sergey 73 Jun 1, 2022
Chrome extension to generate Laravel integration tests while using your app.

Laravel TestTools Check out the introduction post about the chrome extension. Installation git clone [email protected]:mpociot/laravel-testtools.git # i

Marcel Pociot 473 Nov 1, 2022