<commit_before><?php

namespace PicoFeed;

use DateTime;
use DateTimeZone;

/**
 * Logging class
 *
 * @author  <NAME>
 * @package picofeed
 */
class Logging
{
    /**
     * List of messages
     *
     * @static
     * @access private
     * @var array
     */
    private static $messages = array();

    /**
     * Default timezone
     *
     * @static
     * @access private
     * @var array
     */
    private static $timezone = 'UTC';

    /**
     * Add a new message
     *
     * @static
     * @access public
     * @param  string   $message   Message
     */
    public static function setMessage($message)
    {
        $date = new DateTime('now', new DateTimeZone(self::$timezone));

        self::$messages[] = '['.$date->format('Y-m-d H:i:s').'] '.$message;
    }

    /**
     * Get all logged messages
     *
     * @static
     * @access public
     * @return array
     */
    public static function getMessages()
    {
        return self::$messages;
    }

    /**
     * Set a different timezone
     *
     * @static
     * @see    http://php.net/manual/en/timezones.php
     * @access public
     * @param  string   $timezone   Timezone
     */
    public static function setTimeZone($timezone)
    {
        self::$timezone = $timezone ?: self::$timezone;
    }
}<commit_msg>Add method to remove logged messages<commit_after><?php

namespace PicoFeed;

use DateTime;
use DateTimeZone;

/**
 * Logging class
 *
 * @author  <NAME>
 * @package picofeed
 */
class Logging
{
    /**
     * List of messages
     *
     * @static
     * @access private
     * @var array
     */
    private static $messages = array();

    /**
     * Default timezone
     *
     * @static
     * @access private
     * @var array
     */
    private static $timezone = 'UTC';

    /**
     * Add a new message
     *
     * @static
     * @access public
     * @param  string   $message   Message
     */
    public static function setMessage($message)
    {
        $date = new DateTime('now', new DateTimeZone(self::$timezone));

        self::$messages[] = '['.$date->format('Y-m-d H:i:s').'] '.$message;
    }

    /**
     * Get all logged messages
     *
     * @static
     * @access public
     * @return array
     */
    public static function getMessages()
    {
        return self::$messages;
    }

    /**
     * Remove all logged messages
     *
     * @static
     * @access public
     */
    public static function deleteMessages()
    {
        self::$messages = array();
    }

    /**
     * Set a different timezone
     *
     * @static
     * @see    http://php.net/manual/en/timezones.php
     * @access public
     * @param  string   $timezone   Timezone
     */
    public static function setTimeZone($timezone)
    {
        self::$timezone = $timezone ?: self::$timezone;
    }
}
{'fraction_non_alphanumeric': 0.13560525381611643, 'fraction_numerical': 0.0, 'mean_word_length': 1.8464646464646464, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '2065725', 'n_tokens_mistral': 870, 'n_tokens_neox': 868, 'n_words': 212}