পৃষ্ঠাসমূহ

Search Your Article

CS

 

Welcome to GoogleDG – your one-stop destination for free learning resources, guides, and digital tools.

At GoogleDG, we believe that knowledge should be accessible to everyone. Our mission is to provide readers with valuable ebooks, tutorials, and tech-related content that makes learning easier, faster, and more enjoyable.

What We Offer:

  • 📘 Free & Helpful Ebooks – covering education, technology, self-development, and more.

  • 💻 Step-by-Step Tutorials – practical guides on digital tools, apps, and software.

  • 🌐 Tech Updates & Tips – simplified information to keep you informed in the fast-changing digital world.

  • 🎯 Learning Support – resources designed to support students, professionals, and lifelong learners.

    Latest world News 

     

Our Vision

To create a digital knowledge hub where anyone, from beginners to advanced learners, can find trustworthy resources and grow their skills.

Why Choose Us?

✔ Simple explanations of complex topics
✔ 100% free access to resources
✔ Regularly updated content
✔ A community that values knowledge sharing

We are continuously working to expand our content library and provide readers with the most useful and relevant digital learning materials.

📩 If you’d like to connect, share feedback, or suggest topics, feel free to reach us through the Contact page.

Pageviews

Monday, February 20, 2017

Grav - Debugging & Logging

Debugging & logging information is very necessary while developing the themes and plugins. Grav uses debugging information by using some features as described below.

PHP Debug Bar

Grav comes with tool called Debug Bar to display debugging information. By default this feature is disabled. You can turn it on globally or using system.yaml for your development environment.
debugger:
  enabled: true
  twig: true
  shutdown:
    close_connection: true
After enabling debugger true, you can view the following debug bar as shown below. Click on the G symbol which is present at the left side of the corner.
Grav Debugging & Logging In the debug bar, you can view the overall memory usage and time used for processing at the right side corner. It also consist several tabs that provides more information in detail.
Grav Debugging & Logging In the Messages tab, you can view the messages which will help you to debug your Grav development process and the information will get post to this tab from the code via $grav['debugger']->addMessage($my_var).
Grav Debugging & Logging In Timeline tab you can view the breakdown of Grav timing.

Error Display

It displays error messages regarding the block or page at a runtime. In Grav you can easily identify the error and resolve the errors very quickly. Following are the error messages that will get displayed on your screen as shown below.
Grav Debugging & Logging In user/config/system.yaml file, you can disable the error page by setting it to false.
errors:
  display: false
  log: true

Logging

Logging is used for reporting errors and status information from libraries and application. In Grav there are few important logging features as specified below.
$grav['log']->info('My informational message');
$grav['log']->notice('My notice message');
$grav['log']->debug('My debug message');
$grav['log']->warning('My warning message');
$grav['log']->error('My error message');
$grav['log']->critical('My critical message');
$grav['log']->alert('My alert message');
$grav['log']->emergency('Emergency, emergency, there is an emergency here!');
All logging messages will get displayed in the grav.log file which is present under the folder <your_folder_name>/logs/grav.log

No comments:

Post a Comment