GitXplorerGitXplorer
l

profiler

public
174 stars
21 forks
4 issues

Commits

List of commits on branch master.
Unverified
956e1e1fdb788ebdfcd9d9765ea56d39043c6a7c

Merge pull request #44 from franzliedke/patch-1

lloic-sharma committed 10 years ago
Unverified
146d12c7a900c7e8864690a23021910fa0516f71

Improve service provider.

ffranzliedke committed 10 years ago
Unverified
7b7926341f18d3bab74f4ecd564bc75a4f5d84cc

This project is no longer being maintained.

lloic-sharma committed 10 years ago
Unverified
9a02ed662aa3b754c456147368df9756b05a42f2

Improved configuration comment.

lloic-sharma committed 11 years ago
Unverified
7de354235cb47018bdfe0c4ab3ed567f0481ee86

Fixed variable name.

lloic-sharma committed 11 years ago
Unverified
d053b859b0aff67bb8ca91eb201818508be3bba9

Fixed profiler bug in the service provider.

lloic-sharma committed 11 years ago

README

The README file for this repository.

Profiler

A PHP 5.3 profiler based off of Laravel 3's Anbu. NOTE: this project is no longer being maintained. Please use Barry's debug bar instead.

Installation

Installing profiler is simple. First, you'll need to add the package to the require attribute of your composer.json file.

{
    "require": {
        "loic-sharma/profiler": "1.1.*"
    },
}

Installing Using Laravel 4

To enable te profiler in Laravel 4 you will need to register the Service Provider and the Facade.

  1. Add 'Profiler\ProfilerServiceProvider', to the list of service providers in app/config/app.php
  2. Add 'Profiler' => 'Profiler\Facades\Profiler', to the list of class aliases in app/config/app.php
  3. In console run php artisan config:publish loic-sharma/profiler

And voila! You can use the profiler.

Profiler::startTimer('testLogging');

// The profiler listens to Laravel's logger.
Log::info('Hello World!');
Log::notice('Some event occured.');

Profiler::endTimer('testLogging');

Installing For Your Own Project

Add the following to your code:

$logger = new Profiler\Logger\Logger;
$profiler = new Profiler\Profiler($logger);

You can now use the profiler to your heart's content.

$profiler->startTimer('testLogging');

$logger->debug($object);
$logger->info('Hello World!');
$logger->notice('Some event occurred.');
$logger->warning('Careful: some warning.');
$logger->error('Runtime error.');
$logger->critical('This needs to be fixed now!');
$logger->emergency('The website is down right now.');

$profiler->endTimer('testLogging');

echo $profiler;

Copyright and License

Profiler was written by Loic Sharma. Profiler is released under the 2-clause BSD License. See the LICENSE file for details.

Copyright 2012 Loic Sharma