title: Code igniter Logger
body: <p>I am new to code igniter and PHP5. From the following url <a href="http://techtots.blogspot.in/2011/12/logging-request-parameters-in.html" rel="nofollow">http://techtots.blogspot.in/2011/12/logging-request-parameters-in.html</a> i am trying to create a logger where it logs all the request into a table.My question is where should the following code reside.And how will i specify the table name.</p>
  
  <pre><code>class Logger {
  
  private $CI;
  
  public function __construct() {
      $this-&gt;CI =&amp; get_instance();
  }
  
  public function request_logger() {
      $uri = $this-&gt;CI-&gt;uri-&gt;uri_string();
  
          $params = trim(print_r($this-&gt;CI-&gt;input-&gt;post(), TRUE));
  
      log_message('info', '==============');
      log_message('info', 'URI: ' . $uri);
      log_message('info', '--------------');
      log_message('info', $params);
      log_message('info', '==============');
  }
  }
  </code></pre>