Example #1
0
 /**
  * Inicializa el Logger
  */
 public static function initialize($name = '')
 {
     self::$log_path = APP_PATH . 'temp/logs/';
     if ($name === '' || $name === true) {
         $name = 'log' . date('dmY') . '.txt';
     }
     self::$fileLogger = fopen(self::$log_path . $name, 'a');
     if (!self::$fileLogger) {
         throw new KumbiaException("No se puede abrir el log llamado: " . $name);
         return false;
     }
 }
Example #2
0
File: logger.php Project: Jamp/sgas
 /**
  * Inicializa el Logger
  * 
  * @param string $name
  */
 public static function initialize($name = '')
 {
     self::$log_path = APP_PATH . 'temp/logs/';
     //TODO poder cambiar el path
     if ($name === '') {
         $name = 'log' . date('Y-m-d') . '.txt';
     }
     self::$fileLogger = fopen(self::$log_path . $name, 'a');
     if (!self::$fileLogger) {
         throw new KumbiaException("No se puede abrir el log llamado: " . $name);
     }
 }