title: Disabling error logging in CodeIgniter for a specific helper/library
body: <p>I am using the mPDF class to generate PDFs from HTML.</p>
  
  <p>While the PDFs show exactly like they should, my CodeIgniter error log gets packed with error notices that seem to be due to some bug in mPDF.</p>
  
  <p>Since these notices are harmless and the PDFs come out perfectly, all I'd like is to disable the CodeIgniter error logging specifically when I run this class.</p>
  
  <p>But I haven't found a way to do this.</p>
  
  <p>Here's my code:</p>
  
  <p>CONTROLLER</p>
  
  <pre><code>$this-&gt;load-&gt;helper('mpdf');
  mpdf($html, $filename);
  </code></pre>
  
  <p>HELPER (mpdf_helper.php)</p>
  
  <pre><code>function mpdf($html, $filename) 
  {
      $CI =&amp; get_instance();
      $CI-&gt;config-&gt;set_item('log_threshold', 0);
      include('mpdf/mpdf.php');
  
      $mpdf=new mPDF('', 'letter');
      $mpdf-&gt;SetHTMLHeader('powered by example.com');
      $mpdf-&gt;WriteHTML($html, 0);
      $mpdf-&gt;Output($filename, 'I');
  }
  </code></pre>
  
  <p>As you can see I am trying to manually set config for <code>log_threshold</code> to <code>0</code>, but that does not prevent error logging.</p>
  
  <p>FYI my <code>index.php</code> has</p>
  
  <pre><code>define('ENVIRONMENT', 'production');
  </code></pre>
  
  <p>which sets <code>error_reporting(0)</code>.</p>
  
  <p>Do you know what I should do to stop CodeIgniter from logging errors only when I run mPDF?</p>
  
  <p>ERROR EXAMPLES</p>
  
  <pre><code>ERROR - 2012-08-04 23:03:59 --&gt; Severity: Notice  --&gt; Undefined index: direction /var/www/vhosts/asd.com/httpdocs/application/helpers/mpdf/mpdf.php 21103
  
  ERROR - 2012-08-04 23:06:07 --&gt; Severity: Notice  --&gt; Undefined index: MARGIN-TOP /var/www/vhosts/asd.com/httpdocs/application/helpers/mpdf/mpdf.php 17271
  </code></pre>