Note

The online documentation is produced by a web publishing technology created by us to read the documents origins in OpenOffice Writer (ODT) and Microsoft Word (docx) formats and produces native web and PDF versions. In this way we maintain Louder project documentation update and in sync on each of its formats.
Select a Language:
Componente AuditLogger
Introducción
El componente AuditLogger esta diseñado para asistir las tareas de auditoria de sistemas creando logs que lleven el registro de las actividades realizadas en una aplicación de negocios por parte de cada uno de los roles que la utilizan.
Crear un componente de control
Ejemplo: Crear un componente de usuario para la auditoría de sistemas
<?php

class MyApplicationAudit extends AuditLogger {

     public function __construct($note, $transaction=null){
          parent::__construct("Audit");
          $this->bindToField("USER_ID", "usuarios_id");
          $this->bindToField("USERNAME", "nombre");
          $this->bindToField("NOTE", "nota");
          $this->bindToField("IP_ADDRESS", "ipaddress");

          $this->setFieldData("controller", Router::getController());
          $this->setFieldData("action", Router::getAction());
          $this->setFieldData("USER_ID", Session::get("usuariosId"));
          $this->setFieldData("USERNAME", Session::get("usuariosNombre"));
          $this->setFieldData("NOTE", $note);

          if($transaction!=null){
               $this->setTransaction($transaction);
          }

          $this->commit();
     }

}