Accessor for the log file header object assoicated with this LogFileHandle
instance.

@return LogFileHeader The log file header object associated with this LogFileHandle
instance.
971481
protected LogFileHeader logFileHeader()
    {
        if (tc.isEntryEnabled())
            Tr.entry(tc, "logFileHeader", this);
        if (tc.isEntryEnabled())
            Tr.exit(tc, "logFileHeader", _logFileHeader);
        return _logFileHeader;
    }
1192316
public function setLogHandler()
    {
        $this->log = new Logger($this->config->get('log.log_name', 'SD'));
        switch ($this->config['log']['active']) {
            case "graylog":
                $this->log->setHandlers([new GelfHandler(new Publisher(new UdpTransport($this->config['log']['graylog']['ip'], $this->config['log']['graylog']['port'])),
                    $this->config['log']['log_level'])]);
                break;
            case "file":
                $handel = new RotatingFileHandler(LOG_DIR . "/" . $this->name . '.log',
                    $this->config['log']['file']['log_max_files'],
                    $this->config['log']['log_level']);
                $handel->setFormatter(new JsonFormatter());
                $this->log->pushHandler($handel);
                break;
            case "syslog":
                $handel = new SyslogHandler($this->config['log']['syslog']['ident']);
                $handel->setFormatter(new SDJsonFormatter());
                $this->log->pushHandler($handel);
                break;
        }
    }
774149
protected function getMonologHandler()
    {
        return (new StreamHandler($this->path('storage', 'logs/netforce.log'), Logger::DEBUG))->setFormatter(new LineFormatter(null, null, true, true));
    }
724494
protected function getLogFileName()
    {
        if (!$this->notification->getAuthorizationDetails()->isSetAmazonAuthorizationId()) {
            throw new InvalidArgumentException("AuthorizationAuthorizationId is NULL");
        } 
        
        return $this->notification->getAuthorizationDetails()->getAmazonAuthorizationId()
            . "_AuthorizationNotification.txt";
    }
1173212
protected function processLogFile ()
	{
		$this->logFile = (empty($this->logFile)) ? $this->logDir.strtolower($this->level)."Log.txt" : $this->logDir.$this->logFile;
		return $this;
	}
726319
public function getAsInteger()
	{
		$permissions	= @fileperms( $this->pathName );
		if( FALSE === $permissions )
			throw new InvalidArgumentException( 'Could not get permissions of file "'.$this->pathName.'"' );
		return octdec( substr( sprintf( '%o', $permissions ), -4 ) );
	}
652051
public Record openHeaderRecord()
    {
        String strType = this.getProperty(HEADER_RECORD);
        if (UserResource.USER_RESOURCE_FILE.equalsIgnoreCase(strType))
            return new UserResource(this);
        else
            return new UserGroup(this);
    }
561629
public function headers()
	{
		if (!$this->headers)
		{
			$this->rewind();

			$row = fgetcsv($this->file, self::ROW_LENGTH, $this->delimiter);

			$this->position++;

			// store headers for later
			if ($this->position == 1)
			{
				$this->headers = $row;
			}

			$this->rewind();
		}

		return $this->headers;
	}
128660
public function getCronLogfile()
    {
        if (! ($this->offsetExists('cron') && isset($this->cron['logfile']))) {
            return null;
        }

        $file = trim($this->cron['logfile']);
        if (\MUtil_File::isRootPath($file)) {
            return $file;
        }
        return GEMS_ROOT_DIR . '/var/logs/' . $file;
    }
1016983
private static synchronized StreamHandler getStreamHandler() {
    if (methodHandler == null) {
      methodHandler = new ConsoleHandler();
      methodHandler.setFormatter(new Formatter() {
        @Override
        public String format(LogRecord record) {
          return record.getMessage() + "\n";
        }
      });
      methodHandler.setLevel(Level.FINE);
    }
    return methodHandler;
  }
678861
public function getFilePathHeader() {
        if($this->filePathHeader === null){
            throw new InvalidArgumentException(sprintf("The filePathContent must be setter."));
        }
        $path = $this->filePathHeader;
        if($this->container){
            $path = $this->container->get("kernel")->locateResource($path);
        }
        if(!$this->chainModel->getExporterManager()->getFs()->exists($path)){
            throw new InvalidArgumentException(sprintf("The filePathHeader '%s' does not exist.",$path));
        }
        return $path;
    }
984948
public function getHandle()
    {
        if (null === $this->handle) {
            if (false === ($this->handle = @fopen($this->file, 'rb'))) {
                throw FileException::createUsingLastError();
            }
        }

        return $this->handle;
    }
598576
public function getFileManager()
    {
        if ($this->file_manager_instance === null) {
            $this->file_manager_instance = new FileManager($this);
        }

        return $this->file_manager_instance;
    }
804937
protected function getLogFileName ()
    {
        if (! $this->notification->getBillingAgreement()->isSetAmazonBillingAgreementId()) {
            throw new InvalidArgumentException("BillingAgreementId is NULL");
        }
        
        return $this->notification->getBillingAgreement()->getAmazonBillingAgreementId() .
                 "_BillingAgreementNotification.txt";
    }
1015608
public static function logToFile()
    {
        ob_start(function () {});
        $logs = self::$Logs;
        require(dirname(__DIR__) . DS . 'Layout' . DS . 'layout.logger_cli.php');
        $contents = ob_get_clean();
        $file = Core::$logDir . DS . 'Logs' . DS . 'log_latest.php';
        if (is_writable($file))
        {
            file_put_contents($file, '<?php ' . $contents);
        }
    }
1116381
protected static function _checkLogFile()
    {
        if ( null !== static::$_logger )
        {
            return static::$_logFileValid = true;
        }

        if ( empty( static::$_logFilePath ) )
        {
            //	Try and figure out a good place to log...
            static::$_logFilePath = ( \Kisma::get( 'app.log_path', \Kisma::get( 'app.base_path' ) ) ?: dirname( getcwd() ) ) . '/log';
        }

        if ( !is_dir( static::$_logFilePath ) )
        {
            if ( false === @mkdir( static::$_logFilePath, 0777, true ) )
            {
                error_log( 'Unable to create default log directory: ' . static::$_logFilePath );

                return static::$_logFileValid = false;
            }
        }

        if ( empty( static::$_logFileName ) )
        {
            \Kisma::set( 'app.log_file_name', static::$_logFileName = static::DEFAULT_LOG_FILE_NAME );
        }

        static::$_defaultLog = static::$_logFilePath . '/' . trim( static::$_logFileName, '/' );

        static::$_logger = static::createLogger( static::DEFAULT_CHANNEL_NAME );

        //	If we're in debug mode and these haven't been disabled, enable...
        if ( \Kisma::get( CoreSettings::DEBUG ) )
        {
            static::$_enableChromePhp = static::$_enableChromePhp ?: true;
            static::$_enableFirePhp = static::$_enableFirePhp ?: true;
        }

        //	Enable conditional handlers
        if ( static::$_enableFirePhp )
        {
            static::$_logger->pushHandler( new FirePHPHandler() );
        }

        if ( static::$_enableChromePhp )
        {
            static::$_logger->pushHandler( new ChromePHPHandler() );
        }

        return static::$_logFileValid = true;
    }
357054
public function getFile()
    {
        if ($this->fileDetected) {
            return $this->file;
        }

        $this->handle = null;
        $file = &$this->file;

        if (!is_dir($this->dir) && !@mkdir($this->dir, 0755, true)) {
            $message = sprintf('Fail to create directory "%s"', $this->dir);
            ($e = error_get_last()) && $message .= ': ' . $e['message'];
            throw new \RuntimeException($message);
        }

        $file = realpath($this->dir) . '/' . date($this->fileFormat);

        if ($this->fileSize) {
            $firstFile = $file;

            $files = glob($file . '*', GLOB_NOSORT);

            if (1 < count($files)) {
                natsort($files);
                $file = array_pop($files);
            }

            if (is_file($file) && $this->fileSize < filesize($file)) {
                $ext = pathinfo($file, PATHINFO_EXTENSION);
                if (is_numeric($ext)) {
                    $file = $firstFile . '.' . ($ext + 1);
                } else {
                    $file = $firstFile . '.1';
                }
            }
        }

        $this->fileDetected = true;

        return $file;
    }