public static function open()
    {
      $date_of_log = new \DateTime();

      $date_of_log->setTimestamp(time());

      try {

        if (!(is_dir(self::$logger_opts['path']))) {
          mkdir(self::$logger_opts['path']);
        }

        if (($pfile = self::find())) {
          $file = realpath(self::$logger_opts['path']) . DIRECTORY_SEPARATOR  . $pfile;
        } else {
          $file = realpath(self::$logger_opts['path']) . DIRECTORY_SEPARATOR  . __DEFAULT_LOG_PREFIX__ . $date_of_log->format("Y-M-D-h-i-s") . ".log";
        }

        self::$log_file = fopen($file, self::$logger_opts['mode']);

      } catch (\Exception $e) {

        return self::on(FALSE);

      }
    }
public static function open()
    {
      $date_of_log = new \DateTime();

      $date_of_log->setTimestamp(time());

      try {

        if (!(is_dir(self::$logger_opts['path']))) {
          mkdir(self::$logger_opts['path']);
        }

        if (($pfile = self::find())) {
          $file = realpath(self::$logger_opts['path']) . DIRECTORY_SEPARATOR  . $pfile;
        } else {
          $file = realpath(self::$logger_opts['path']) . DIRECTORY_SEPARATOR  . __DEFAULT_LOG_PREFIX__ . $date_of_log->format("Y-M-D-h-i-s") . ".log";
        }

        self::$log_file = fopen($file, self::$logger_opts['mode']);

      } catch (\Exception $e) {

        return self::on(FALSE);

      }
    }
public static function open ( ) { $ date_of_log = new \ DateTime ( ) ; $ date_of_log -> setTimestamp ( time ( ) ) ; try { if ( ! ( is_dir ( self :: $ logger_opts [ 'path' ] ) ) ) { mkdir ( self :: $ logger_opts [ 'path' ] ) ; } if ( ( $ pfile = self :: find ( ) ) ) { $ file = realpath ( self :: $ logger_opts [ 'path' ] ) . DIRECTORY_SEPARATOR . $ pfile ; } else { $ file = realpath ( self :: $ logger_opts [ 'path' ] ) . DIRECTORY_SEPARATOR . __DEFAULT_LOG_PREFIX__ . $ date_of_log -> format ( "Y-M-D-h-i-s" ) . ".log" ; } self :: $ log_file = fopen ( $ file , self :: $ logger_opts [ 'mode' ] ) ; } catch ( \ Exception $ e ) { return self :: on ( FALSE ) ; } }
open the current
log. Set by day.
If we cannot open a folder,
file set catapult logging off

by default this will output in the current
directory. If there is a logs directory in the
folder, it will use that
open the current log . Set by day . If we cannot open a folder file set catapult logging off