You are here

README.txt in DBLog Filter 8

Same filename and directory in other branches
  1. 8.2 README.txt
CONTENTS OF THIS FILE
---------------------
 * Introduction
 * Installation
 * Configuration
 * Maintainers

INTRODUCTION
-----------
 * DBLOG FILTER module allows you to store only filtered db log messages based
   on log type and log level.
 * Useful to restrict unwanted message types and reduce watchdog size for
    better performance.
 * Majorly useful in production sites when we want to log only
    limited messages.
 * Logging can be restricted either by the Levels. To Log only Error Level logs
   for a site, you can check "Errors" under "Select Severity Levels." in the
   configuration page.
 * Custom logging can also be done ignoring all the core logs too, by setting
   the values under "Enter DB Log type and Severity Levels."

INSTALLATION
------------
 * Install as you would normally install a contributed drupal module. See:
   https://drupal.org/documentation/install/modules-themes/modules-8
   for further information.

CONFIGURATION
-------------
 * After installation copy below lines in sites/default/services.yml
    services:  
       logger.dblog:    
          alias: dblog_filter.log
 * Don't forgot to Clear cache of your site.
 * Go to http://YOURSITE/admin/config/development/dblog-filter
   to configure type and level.
 * To restrict by Severity Level, Select the allowed severity levels.
 * To restrict by Custom Logging, set it up under "Enter DB Log type
   and Severity Levels."
   Give one per line as (TYPE|LEVEL)
    - php|notice,error,alert
    - mymodule|notice,warning
   This shows up all the messages of type "php" and "mymodule", with with their
   respective severity levels.
   Logs Recorded(as per the above settings):
   1. \Drupal::logger('mymodule')->notice('@build:',
        array('@build' => print_r($build, true)));
   2. \Drupal::logger('php')->alert('@build:',
        array('@build' => print_r($build, true)));
   Logs not recorded:
   1. \Drupal::logger('php')->warning('@build:',
       array('@build' => print_r($build, true)));

File

README.txt
View source
  1. CONTENTS OF THIS FILE
  2. ---------------------
  3. * Introduction
  4. * Installation
  5. * Configuration
  6. * Maintainers
  7. INTRODUCTION
  8. -----------
  9. * DBLOG FILTER module allows you to store only filtered db log messages based
  10. on log type and log level.
  11. * Useful to restrict unwanted message types and reduce watchdog size for
  12. better performance.
  13. * Majorly useful in production sites when we want to log only
  14. limited messages.
  15. * Logging can be restricted either by the Levels. To Log only Error Level logs
  16. for a site, you can check "Errors" under "Select Severity Levels." in the
  17. configuration page.
  18. * Custom logging can also be done ignoring all the core logs too, by setting
  19. the values under "Enter DB Log type and Severity Levels."
  20. INSTALLATION
  21. ------------
  22. * Install as you would normally install a contributed drupal module. See:
  23. https://drupal.org/documentation/install/modules-themes/modules-8
  24. for further information.
  25. CONFIGURATION
  26. -------------
  27. * After installation copy below lines in sites/default/services.yml
  28. services:
  29. logger.dblog:
  30. alias: dblog_filter.log
  31. * Don't forgot to Clear cache of your site.
  32. * Go to http://YOURSITE/admin/config/development/dblog-filter
  33. to configure type and level.
  34. * To restrict by Severity Level, Select the allowed severity levels.
  35. * To restrict by Custom Logging, set it up under "Enter DB Log type
  36. and Severity Levels."
  37. Give one per line as (TYPE|LEVEL)
  38. - php|notice,error,alert
  39. - mymodule|notice,warning
  40. This shows up all the messages of type "php" and "mymodule", with with their
  41. respective severity levels.
  42. Logs Recorded(as per the above settings):
  43. 1. \Drupal::logger('mymodule')->notice('@build:',
  44. array('@build' => print_r($build, true)));
  45. 2. \Drupal::logger('php')->alert('@build:',
  46. array('@build' => print_r($build, true)));
  47. Logs not recorded:
  48. 1. \Drupal::logger('php')->warning('@build:',
  49. array('@build' => print_r($build, true)));