<commit_before><?php

/*
 * Todos los derechos reservados por <NAME> 
 * 2015
 * Contacto: <EMAIL>
 */

namespace app\controllers;

use system\core\Controller;
use system\core\View;
use system\core\Logger;
use system\core\LogException;

class UsuariosController extends Controller
{

    public function index()
    {
        $userModel = new \app\models\UserModel();

        $users = $userModel->getUsers();

        $view = new View("usuarios", array("users" => $users));
        echo $view->render();
    }

    public function testLog()
    {
        try {
            Logger::alert("Ok");
            Logger::info("{usuario} tiene {edad}", array("usuario" => "geo", "edad" => "36"));

            throw new LogException;
        } catch (LogException $exc) {
            $exc->logError();
            $exc->errorMessage("Aqui va un error");
        }
    }
    public function testLogExeption(){
        
    }

}<commit_msg>Added logger class<commit_after><?php

/*
 * Todos los derechos reservados por <NAME> 
 * 2015
 * Contacto: <EMAIL>
 */

namespace app\controllers;

use system\core\Controller;
use system\core\View;
use system\core\Logger;
use system\core\LogException;

class UsuariosController extends Controller
{

    public function index()
    {
        $userModel = new \app\models\UserModel();

        $users = $userModel->getUsers();

        $view = new View("usuarios", array("users" => $users));
        echo $view->render();
    }

    public function testLog()
    {
            Logger::alert("Ok");
            Logger::info("{usuario} tiene {edad}", array("usuario" => "geo", "edad" => "36"));
    }

    public function testLogExeption()
    {
        try {
            throw new LogException;
        } catch (LogException $exc) {
            $exc->logError();
            $exc->errorMessage("Aqui va un error");
        }
    }

}
{'fraction_non_alphanumeric': 0.14814814814814814, 'fraction_numerical': 0.00644122383252818, 'mean_word_length': 2.382940108892922, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 21, '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': '2350065', 'n_tokens_mistral': 582, 'n_tokens_neox': 562, 'n_words': 132}