src/Native5/Core/Log/Impl/AbstractLogAdapter.php
public function log($message, $args, $priority='LOG_INFO')
    {
        if (array_key_exists('FILENAME', $args) === false) {
            $backtrace        = debug_backtrace();
            $args['FILENAME'] = $backtrace[0]['file'];
            $args['LINENO']   = $backtrace[0]['line'];
        }//end if

        $newArgs   = array();
        $fileParts = explode('/', $args['FILENAME']);
        $newArgs[] = array_pop($fileParts)."#".$args['LINENO'];
        unset($args['LINENO']);
        unset($args['FILENAME']);
        foreach ($args as $arg) {
            $newArgs[] = $arg;
        }//end foreach

        if ($this->_isSecure($message) === true) {
            // TODO: Do not write log
            // Get list of handlers which will process message
            // Send message about which handlers are erroneous.
        } else {
            if (empty($this->_logPatterns)) {
                $this->_logPatterns[Logger::ALL] = new FileLogHandler();
            }//end if

            foreach ($this->_logPatterns as $pattern => $handler) {
                if(preg_match($pattern, $message))
                    $handler->writeLog($message, $priority, $newArgs);
            }//end foreach
        }
    }
public function log($message, $args, $priority='LOG_INFO')
    {
        if (array_key_exists('FILENAME', $args) === false) {
            $backtrace        = debug_backtrace();
            $args['FILENAME'] = $backtrace[0]['file'];
            $args['LINENO']   = $backtrace[0]['line'];
        }//end if

        $newArgs   = array();
        $fileParts = explode('/', $args['FILENAME']);
        $newArgs[] = array_pop($fileParts)."#".$args['LINENO'];
        unset($args['LINENO']);
        unset($args['FILENAME']);
        foreach ($args as $arg) {
            $newArgs[] = $arg;
        }//end foreach

        if ($this->_isSecure($message) === true) {
            // TODO: Do not write log
            // Get list of handlers which will process message
            // Send message about which handlers are erroneous.
        } else {
            if (empty($this->_logPatterns)) {
                $this->_logPatterns[Logger::ALL] = new FileLogHandler();
            }//end if

            foreach ($this->_logPatterns as $pattern => $handler) {
                if(preg_match($pattern, $message))
                    $handler->writeLog($message, $priority, $newArgs);
            }//end foreach
        }
    }
public function log ( $ message , $ args , $ priority = 'LOG_INFO' ) { if ( array_key_exists ( 'FILENAME' , $ args ) === false ) { $ backtrace = debug_backtrace ( ) ; $ args [ 'FILENAME' ] = $ backtrace [ 0 ] [ 'file' ] ; $ args [ 'LINENO' ] = $ backtrace [ 0 ] [ 'line' ] ; } //end if $ newArgs = array ( ) ; $ fileParts = explode ( '/' , $ args [ 'FILENAME' ] ) ; $ newArgs [ ] = array_pop ( $ fileParts ) . "#" . $ args [ 'LINENO' ] ; unset ( $ args [ 'LINENO' ] ) ; unset ( $ args [ 'FILENAME' ] ) ; foreach ( $ args as $ arg ) { $ newArgs [ ] = $ arg ; } //end foreach if ( $ this -> _isSecure ( $ message ) === true ) { // TODO: Do not write log // Get list of handlers which will process message // Send message about which handlers are erroneous. } else { if ( empty ( $ this -> _logPatterns ) ) { $ this -> _logPatterns [ Logger :: ALL ] = new FileLogHandler ( ) ; } //end if foreach ( $ this -> _logPatterns as $ pattern => $ handler ) { if ( preg_match ( $ pattern , $ message ) ) $ handler -> writeLog ( $ message , $ priority , $ newArgs ) ; } //end foreach } }
Implementation of `log` method in Logger

@param mixed $message  Message to log
@param mixed $args     Arguments to message
@param mixed $priority Priority of message

@access public
@return void
Implementation of log method in Logger