-
-
Notifications
You must be signed in to change notification settings - Fork 215
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
How to customise Error Page ? #27
Comments
@Sanjoy87 The error page that Tracy renders on fatal error or uncatched exception is only a last resort. Therefore it is as simple as possible and you cannot customize it. You should do something similar to this Tracy\Debugger::enable();
try {
$myApplication->run();
} catch (\Exception $e) {
if ( ! Tracy\Debugger::$productionMode) {
throw $e;
}
Tracy\Debugger::log($e, 'error');
$myApplication->renderErrorPage($e);
} this should allow you to
|
@fprochazka if I understood it correctly, @Sanjoy87 was talking about blue-screen. |
Oh, in that case, there are bluescreen panels that you can use for adding information. For example rendering of SQL that caused the exception, used like this: Nette\Diagnostics\Debugger::getBlueScreen()
->addPanel('Nette\Bridges\DatabaseTracy\ConnectionPanel::renderException'); But there is no way to customize bluescreen design at this point. |
@Sanjoy87 This is how Nette Framework customizes Tracy for itself: https://github.com/dg/nette/blob/506b1e6e3470f31caa1e923528bcd1750e18b392/Nette/Bridges/Framework/TracyBridge.php |
Thanks @fprochazka @hrach @JanTvrdik all of you for quick response. Tracy is really awesome project so far. I can see we can do some small changes with blue screen object. Tracy is standalone component. In this case it should be more flexible to customize (Development mode) according to the project though it has various features in it. No idea how much my comments are valid for this project but i found few features can be added. For example -
Hope it helps. Thanks |
You mean the tiny text in Tracy logo? That's unlikely to change.
That's that the parameter
And that's OK. It's a panel title, it should not contain any HTML tags.
Because Tracy is usable without Composer as well. If you use Composer, you'll never need to load this file. |
Yes it make sense. thanks @JanTvrdik .
Cygnite Framerwork is under MIT license, hope it is not a problem to integrate Tracy with. It seems we need to code a bit to fit Tracy with our color schema.
We can add same feature into Tracy to make it much more flexible. Is there any discussion chat room for Tracy, if possible let me know if we can chat, to know much more about it. Thanks for your response. Great work! |
I could understand if you needed dark version but rebranding it is just silly. Getting rid of obsessions about tools visual style is more helpful then creating one. Tracy has quite polished appearance. And as a tool for debugging hers purpose is not to look colourful. Maybe it would be useful to have interface for main framework and its version instead of constant Nette Framework. But that is something for @dg to decide. For now you can show it by adding BarPanel. |
To allow to create skins for Tracy is not a bad idea. |
All included in the |
I'd like to bring this back to life. I think that, at the very least, it should be possible to override the stylesheet definition. As an alternative, perhaps we could work on the blue screen included in the package itself. In my honest opinion, the blue screen could do with a minimal/modern facelift. The red is quite peircing to the eye (for me, anyway), and system native fonts would look great. The idea of multiple 'skins' could very well be overkill, and so my thinking is just to improve its appearance in such a way that it's more comfortable. Here's a screenshot of a stylesheet I worked on today: @dg, do you think this could be worked on? |
You may also see the reference screen for Cygnite Framework. Tracy is default debugger of Cygnite and the color combination you are proposing is almost looking similar. :)
Thanks !!
…Sent from my iPhone
On 08-Oct-2017, at 10:40 PM, Mike Rockétt <notifications@github.com<mailto:notifications@github.com>> wrote:
I'd like to bring this back to life. I think that, at the very least, it should be possible to override the stylesheet definition. As an alternative, perhaps we could work on the blue screen included in the package itself.
In my honest opinion, the blue screen could do with a minimal/modern facelift. The red is quite peircing to the eye (for me, anyway), and system native fonts would look great. The idea of multiple 'skins' could very well be overkill, and so my thinking is just to improve its appearance in such a way that it's more comfortable.=
Here's a screenshot of a stylesheet I worked on today:
[pw_tracy_1]<https://user-images.githubusercontent.com/4586280/31319033-33ace05c-ac5c-11e7-8359-54859a2c4783.jpeg>
@dg<https://github.com/dg>, do you think this could be worked on?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#27 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/ABqebbJhc8syHt0YE-4L_ew2nsooVjqQks5sqQHfgaJpZM4BuYu4>.
|
I added |
Thanks @dg this will be great! Do you have any thoughts about adding similar options for the other css files as well? bar.css Currently I am overriding a lot of things in bar.css which mostly works great, but it's a bit hacky when it comes to loading my replacement css file when on the bluescreen page. |
@mikerockett the red "bluescreen" is a distinguishing mark of Tracy and to change it would cause a negative reaction, which I really do not want. (Btw, red was much more aggresive years ago :-) https://phpfashion.com/images/exception-ndebug.gif It's possible to change the font to a system one, but I think nobody even noticed it, which makes me feel it is unnecessary. |
@adrianbj So it would be better |
Yes, this might be better - overriding, rather than replacing means that even if you add more DOM elements and related CSS rules to Tracy in the future, we don't need to worry about keeping our custom user css files up to date. Caveat - CSS is not my favorite thing in the world, so maybe there is an even better approach? |
Ok, I repushed it. |
@dg Thank you, this is awesome. I can agree with the red and how folks are used to it - I get that it could cause a negative reaction. That said, I think it's 'old-school', and not so friendly on the eyes (mine, anyway). Nonetheless, this makes it super-easy to fix. 👍 |
Thank you @dg - that is working really nicely :) |
I've changed it yet to array |
Hi,
I seems tracy has all cool features as I am looking for, but i would like to know how can I customise error template page, I am trying to integrate with my latest project Cygnite Framework , I would like to display few information about Cygnite Framework in the Error page.
Is it possible i can overwrite the error page, change design, color schema, project name and version etc.
Any response would be highly appreciated.
Thanks,
Sanjoy
The text was updated successfully, but these errors were encountered: