Lançado Adianti Framework 7.6!
Clique aqui para saber mais
menu

Adianti Solutions

API

Adianti, Framework, PHP, MVC, Active record, Front controller, IDE, RAD, Web, multiplataforma, geração de código, desenvolvimento rápido, relatórios, formulários, listagens, datagrids, gráficos, banco de dados, padrões de projeto, design patterns API do Adianti Framework.
API Docs
code
Selecione a classe

Source for file TLoggerHTML.php

Documentation is available at TLoggerHTML.php

  1. <?php
  2. namespace Adianti\Log;
  3.  
  4. use Adianti\Log\TLogger;
  5.  
  6. /**
  7.  * Register LOG in HTML files
  8.  *
  9.  * @version    7.4
  10.  * @package    log
  11.  * @author     Pablo Dall'Oglio
  12.  * @copyright  Copyright (c) 2006 Adianti Solutions Ltd. (http://www.adianti.com.br)
  13.  * @license    http://www.adianti.com.br/framework-license
  14.  */
  15. class TLoggerHTML extends TLogger
  16. {
  17.     /**
  18.      * Writes an message in the LOG file
  19.      * @param  $message Message to be written
  20.      */
  21.     public function write($message)
  22.     {
  23.         $level 'Debug';
  24.         
  25.         $time date("Y-m-d H:i:s");
  26.         // define the LOG content
  27.         $text "<p>\n";
  28.         $text.= "   <b>$level</b>: \n";
  29.         $text.= "   <b>$time</b> - \n";
  30.         $text.= "   <i>$message</i> <br>\n";
  31.         $text.= "</p>\n";
  32.         // add the message to the end of file
  33.         $handler fopen($this->filename'a');
  34.         fwrite($handler$text);
  35.         fclose($handler);
  36.     }
  37. }