<commit_before><?php if ( ! defined('BASEPATH')) exit('Direct script access not permitted.');

/**
 * OmniLogger class.
 *
 * @author          <NAME> (http://github.com/experience/)
 * @copyright       Experience Internet
 * @package         Omnilog
 */

require_once dirname(__FILE__) .'/../classes/omnilog_entry.php';

class Omnilogger {

  /* --------------------------------------------------------------
   * STATIC METHODS
   * ------------------------------------------------------------ */

  /**
   * Adds an entry to the log.
   *
   * @access  public
   * @param Omnilog_entry   $entry        The log entry.
   * @return  bool
   */
  public static function log(Omnilog_entry $entry)
  {
    $EE =& get_instance();
    $EE->load->add_package_path(PATH_THIRD .'omnilog/');
    $EE->load->model('omnilog_model');

    try
    {
      $saved_entry = $EE->omnilog_model->save_entry_to_log($entry);

      if ($entry->get_notify_admin() === TRUE)
      {
        $EE->omnilog_model->notify_site_admin_of_log_entry($saved_entry);
      }

      return TRUE;
    }
    catch (Exception $e)
    {
      // Don't try to log the error using OmniLog. Remember Inception.
      return FALSE;
    }
  }


}
<commit_msg>Tidy up formatting.<commit_after><?php if ( ! defined('BASEPATH')) exit('Direct script access not permitted.');

/**
 * OmniLogger class.
 *
 * @author          <NAME> (http://github.com/experience/)
 * @copyright       Experience Internet
 * @package         Omnilog
 */

require_once dirname(__FILE__) .'/../classes/omnilog_entry.php';

class Omnilogger {

  /* --------------------------------------------------------------
   * STATIC METHODS
   * ------------------------------------------------------------ */

  /**
   * Adds an entry to the log.
   *
   * @access  public
   * @param   Omnilog_entry     $entry      The log entry.
   * @return  bool
   */
  public static function log(Omnilog_entry $entry)
  {
    $EE =& get_instance();
    $EE->load->add_package_path(PATH_THIRD .'omnilog/');
    $EE->load->model('omnilog_model');

    try
    {
      $saved_entry = $EE->omnilog_model->save_entry_to_log($entry);

      if ($entry->get_notify_admin() === TRUE)
      {
        $EE->omnilog_model->notify_site_admin_of_log_entry($saved_entry);
      }

      return TRUE;
    }
    catch (Exception $e)
    {
      // Don't try to log the error using OmniLog. Remember Inception.
      return FALSE;
    }
  }


}

{'fraction_non_alphanumeric': 0.22891072891072892, 'fraction_numerical': 0.0, 'mean_word_length': 1.757336343115124, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5617915', 'n_tokens_mistral': 770, 'n_tokens_neox': 754, 'n_words': 152}