Skip to content
This repository has been archived by the owner on Jun 10, 2019. It is now read-only.

How do you use it, what should it output? #38

Open
ux-engineer opened this issue Nov 21, 2013 · 5 comments
Open

How do you use it, what should it output? #38

ux-engineer opened this issue Nov 21, 2013 · 5 comments

Comments

@ux-engineer
Copy link

Just installed on Laravel 4 and added service provider and facade to app config.

With...

Profiler::startTimer('testLogging');
Log::info('Loop start');
Log::info('Loop end');
Profiler::endTimer('testLogging');

...I get only the usual log entries. No timer benchmark data?

@loic-sharma
Copy link
Owner

Did you publish the configs and assets?

php artisan config:publish loic-sharma/profiler
php artisan asset:publish

@ux-engineer
Copy link
Author

I did publish the configs, do I need to publish the assets also (there wasn't any mention about that)?

@ux-engineer
Copy link
Author

Publishing assets did nothing. Log says just:

[2013-11-23 16:43:54] log.INFO: Loop start [] []
[2013-11-23 16:43:54] log.INFO: Loop end [] []

@ux-engineer
Copy link
Author

I just realized that there is debug bar added to responses. There was no mention about that in the docs!

We would primarily need to be able to log debug data when calling Profiler::startTimer() and Profiler::endTimer() as we are developing an API and using different tech for the front-end...

How to achieve that, could you add this feature as an optional way?

@loic-sharma
Copy link
Owner

Oh sorry, my mistake - I misunderstood your issue. Yes, this Profiler is a Laravel 4 of Laravel 3's Anbu profiler which added a bar at the bottom.

As of v1, there is no way to log the start and end timers. I started working on a second version of Profiler a while back that was much more flexible, but I haven't finished it yet. Logging timers sounds like a great feature though.

I suppose for now you could call Profiler::getTimers() and manually log them. Let me know if you need anything else.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants