Skip to content

Instantly share code, notes, and snippets.

@m4rcsch
Created October 19, 2011 09:00
Show Gist options
  • Save m4rcsch/1297788 to your computer and use it in GitHub Desktop.
Save m4rcsch/1297788 to your computer and use it in GitHub Desktop.

Revisions

  1. m4rcsch renamed this gist Oct 19, 2011. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. m4rcsch created this gist Oct 19, 2011.
    12 changes: 12 additions & 0 deletions loggerWriteFilter
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    /**
    * Inspect the message, and do a string conversion via print_r
    *
    * @author: 2011 weluse GmbH, Marc Schwering
    */
    Logger::applyFilter('write', function ($self, $params, $chain){
    $var = $params['message'];
    if(is_array($var) || is_object($var)){
    $params['message'] = print_r($var,true);
    }
    return $chain->next($self, $params, $chain);
    });