<commit_before><?php
/**
 * Starlit Db.
 *
 * @copyright Copyright (c) 2016 Starweb / Ehandelslogik i Lund AB
 * @license   BSD 3-Clause
 */

namespace Starlit\Db\Monolog;

use Monolog\Handler\AbstractProcessingHandler;
use Monolog\Logger;
use Starlit\Db\Db;

/**
 * Monolog handler to log to a database table.
 *
 * Use a table structure like this for compatibility:
 *
 * CREATE TABLE `log` (
 *   `log_entry_id` BIGINT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
 *   `time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
 *   `channel` VARCHAR(255) NOT NULL,
 *   `level` VARCHAR(10) NOT NULL,
 *   `message` TEXT NOT NULL,
 *   PRIMARY KEY (`log_entry_id`),
 *   KEY `time` (`time`),
 *   KEY `channel` (`channel`),
 *   KEY `level` (`level`)
 * );<commit_msg>Monolog handler sql update.<commit_after><?php
/**
 * Starlit Db.
 *
 * @copyright Copyright (c) 2016 Starweb / Ehandelslogik i Lund AB
 * @license   BSD 3-Clause
 */

namespace Starlit\Db\Monolog;

use Monolog\Handler\AbstractProcessingHandler;
use Monolog\Logger;
use Starlit\Db\Db;

/**
 * Monolog handler to log to a database table.
 *
 * Use a table structure like this for compatibility:
 *
 * CREATE TABLE `log` (
 *   `log_entry_id` BIGINT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
 *   `time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
 *   `channel` VARCHAR(64) NOT NULL,
 *   `level` VARCHAR(10) NOT NULL,
 *   `message` TEXT NOT NULL,
 *   PRIMARY KEY (`log_entry_id`),
 *   KEY `time` (`time`),
 *   KEY `channel` (`channel`),
 *   KEY `level` (`level`)
 * );
{'fraction_non_alphanumeric': 0.1353826030085023, 'fraction_numerical': 0.015042511445389144, 'mean_word_length': 3.736842105263158, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '5363875', 'n_tokens_mistral': 572, 'n_tokens_neox': 532, 'n_words': 159}