Embryo/Log/StreamLogger.php
public function log($level, $message, array $context = [])
        {
            if (!is_string($level) || !is_string($message)) {
                throw new \InvalidArgumentException('Level or message must be a string');
            }

            $file    = $this->logPath.'/'.$level.'.log';
            $stream  = $this->streamFactory->createStreamFromFile($file, 'a+');
            $content = $this->interpolate($message."\n", $context);   
            $stream->write($content);
        }
public function log($level, $message, array $context = [])
        {
            if (!is_string($level) || !is_string($message)) {
                throw new \InvalidArgumentException('Level or message must be a string');
            }

            $file    = $this->logPath.'/'.$level.'.log';
            $stream  = $this->streamFactory->createStreamFromFile($file, 'a+');
            $content = $this->interpolate($message."\n", $context);   
            $stream->write($content);
        }
public function log ( $ level , $ message , array $ context = [ ] ) { if ( ! is_string ( $ level ) || ! is_string ( $ message ) ) { throw new \ InvalidArgumentException ( 'Level or message must be a string' ) ; } $ file = $ this -> logPath . '/' . $ level . '.log' ; $ stream = $ this -> streamFactory -> createStreamFromFile ( $ file , 'a+' ) ; $ content = $ this -> interpolate ( $ message . "\n" , $ context ) ; $ stream -> write ( $ content ) ; }
Write log.

@param string $level
@param mixed $message
@param array $context
@return void
Write log .