<commit_before><?php

namespace Fuel\Tasks;

use \Phresque\Worker;

class Queue
{
	/**
	 * Logger instance
	 *
	 * @var \Psr\Log\LoggerInterface
	 */
	protected $logger;

	/**
	 * Shutdown callable
	 *
	 * @var callable
	 */
	protected $shutdown;

	public function __construct()
	{
		// Initialize logger
		$logger = clone \Log::instance();

		// Get original handler
		$handler = $logger->popHandler();
		$formatter = new \Monolog\Formatter\ContextLineFormatter("%level_name% - %datetime% --> %message% - %context%".PHP_EOL, "Y-m-d H:i:s");
		$handler->setFormatter($formatter);
		$logger->pushHandler($handler);


		// Only log to console when it is enabled
		$console = \Cli::option('c', false);

		if ($console)
		{
			// Console handler
			$handler = new \Monolog\Handler\ConsoleHandler(\Monolog\Logger::NOTICE);
			$formatter = new \Monolog\Formatter\ContextLineFormatter("%level_name% --> %message% - %context%".PHP_EOL, "Y-m-d H:i:s");
			$handler->setFormatter($formatter);
			$logger->pushHandler($handler);<commit_msg>Console debug level<commit_after><?php

namespace Fuel\Tasks;

use \Phresque\Worker;

class Queue
{
	/**
	 * Logger instance
	 *
	 * @var \Psr\Log\LoggerInterface
	 */
	protected $logger;

	/**
	 * Shutdown callable
	 *
	 * @var callable
	 */
	protected $shutdown;

	public function __construct()
	{
		// Initialize logger
		$logger = clone \Log::instance();

		// Get original handler
		$handler = $logger->popHandler();
		$formatter = new \Monolog\Formatter\ContextLineFormatter("%level_name% - %datetime% --> %message% - %context%".PHP_EOL, "Y-m-d H:i:s");
		$handler->setFormatter($formatter);
		$logger->pushHandler($handler);


		// Only log to console when it is enabled
		$console = \Cli::option('c', false);

		if ($console)
		{
			// Console handler
			$handler = new \Monolog\Handler\ConsoleHandler(\Monolog\Logger::DEBUG);
			$formatter = new \Monolog\Formatter\ContextLineFormatter("%level_name% --> %message% - %context%".PHP_EOL, "Y-m-d H:i:s");
			$handler->setFormatter($formatter);
			$logger->pushHandler($handler);
{'fraction_non_alphanumeric': 0.17159476490547745, 'fraction_numerical': 0.0, 'mean_word_length': 3.8111888111888113, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, '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': '180062', 'n_tokens_mistral': 742, 'n_tokens_neox': 663, 'n_words': 139}