Acronym of "Lazy Guinea Pig".
Created by the laziest, LGP is a Drupal library for slackers. Aren't you?
ATM, LGP provides a set of tools to debug Drupal.
- Write given debug message to a temporary file, the LGP file
- Low memory footprint, skip Database bottleneck
- Useful where Devel's dsm() does not works or when you need an alternative debug log, by example: while debugging services.module (instead of Services log) or during hook_init().
- Centralized debug file, LGP file is shared by drupal installations that use same temporary directory
LGP implements the following functions:
- lgp_print($message): Log $message to LGP file.
- lfp($var, $keys_only = FALSE): Log to LGP file in print_r format. Alternatively print keys only (if passed an array as argument)
- lfd($var): Log $var to LGP file in var_dump format.
- lfx($var): Log $var to LGP file in var_export format.
- lbt($ignore_args = TRUE): Log backtrace to LGP file, without functions arguments (default behavior see debug_backtrace)
LGP provides the following drush command:
- lgp-console: Console watcher. Shows log of functions: lfp(), lfd() and lfx().
$ drush lgc
Sponsored by Dilygent.