@param \ManaPHP\Logger\Log $log

@return void
327235
public function append($log)
    {
        if ($this->_lazy) {
            $context = $this->_context;

            $context->logs[] = $this->_format($log);
        } else {
            $this->_write($this->_format($log));
        }
    }
267224
public function setLogger(LoggerInterface $logger):void{
		$this->logger = $logger;
		$this->driver->setLogger($logger);
		$this->query->setLogger($logger);
	}
397805
public function log($message)
    {
        if (null !== $this->logger) {
            $logger = $this->logger;
            $logger($message);
        }
    }
748481
protected function _log($contents, $log) {
		$config = [
			'level' => LOG_DEBUG,
			'scope' => 'email',
		];
		if ($log !== true) {
			if (!is_array($log)) {
				$log = ['level' => $log];
			}
			$config = array_merge($config, $log);
		}

		Log::write(
			$config['level'],
			PHP_EOL . $contents['headers'] . PHP_EOL . $contents['message'],
			$config['scope']
		);
	}
876555
public function logMessage(Message $message): void
    {
        if (in_array($message->getLevel(), $this->config['log'])) {
            if ($this->getMessageFunction !== null) {
                $line = call_user_func($this->getMessageFunction, $message);
            } else {
                $time = $message->getTime()->format('y-m-d H:i:s.v');
                $level = strtoupper($message->getLevel());
                $space = str_repeat(' ', 10 - strlen($level));
                $who = $message->getWho() ?? Log::getWho();
                $line = "{$time} {$level}{$space}{$who}\t{$message->getMessage()}\n";
            }

            if (is_string($line)) {
                print $line;
            }
        }
    }
22481
public function trim($log)
    {
        $period = new \DateTime('-7 day');
        if ($log === 'change') {
            $this->changeRepository->trimLog($period);
        } elseif ($log === 'system') {
            $this->systemRepository->trimLog($period);
        } else {
            throw new \UnexpectedValueException("Invalid log type requested: $log");
        }
    }
1238533
public function log($message)
    {
        if ($this->progress) {
            $this->progress->setMessage($message);
            $this->logs[] = $message;
        } else {
            $this->output->writeLn($message);
        }
    }
824937
protected function processLogs($logs)
	{
		$text='';
		foreach($logs as $log)
			$text.=$this->formatLogMessage($log[0],$log[1],$log[2],$log[3]);

		$logFile=$this->getLogPath().DIRECTORY_SEPARATOR.$this->getLogFile();
		$fp=@fopen($logFile,'a');
		@flock($fp,LOCK_EX);
		if(@filesize($logFile)>$this->getMaxFileSize()*1024)
		{
			$this->rotateFiles();
			@flock($fp,LOCK_UN);
			@fclose($fp);
			@file_put_contents($logFile,$text,FILE_APPEND|LOCK_EX);
		}
		else
		{
			@fwrite($fp,$text);
			@flock($fp,LOCK_UN);
			@fclose($fp);
		}
	}
1139079
public function debug($message): void
	{
		$message = $this->logMessToArray($message);
		$this->log(array_merge(['SEVERITY' => 'DEBUG'], $message));
	}
1008115
protected function log($message): void
    {
        if ($this->logger !== null) {
            $this->logger->log($message);
        }
    }
518557
public function setLog($value)
    {
        $this->_validateString('Log', $value);

        if ($this->data['log'] === $value) {
            return;
        }

        $this->data['log'] = $value;

        $this->_setModified('log');
    }
952899
public function log($log)
    {
        $type = $log->type();
        if (!isset($this->_logs[$type])) {
            $this->_logs[$type] = [];
        }
        $this->_logs[$type][] = $log;
        return $this;
    }
646667
protected function _reportSuiteMessages($log)
    {
        $this->_indent = 0;
        $messages = array_values(array_filter($log->messages()));
        array_pop($messages);
        foreach ($messages as $message) {
            $this->write($message);
            $this->write("\n");
            $this->_indent++;
        }
    }
1294278
public function log($log, $opt) {
		if (isset ( $opt [self::IMPORT_BCS_LOG_METHOD] ) && function_exists ( $opt [self::IMPORT_BCS_LOG_METHOD] )) {
			$opt [self::IMPORT_BCS_LOG_METHOD] ( $log );
		} else {
			trigger_error ( $log );
		}
	}
487683
public function add(Log $log)
    {
        $this->logs[spl_object_hash($log)] = $log;
        $this->level = null;
    }
1104036
public function logMessage(Message $message): void
    {
        if (in_array($message->getLevel(), $this->config['log'])) {
            if ($this->config['send_immediately']) {

                call_user_func($this->config['exec'], $message);

            } else {
                $this->messages[] = $message;

                if (count($this->messages) == 1) {
                    // register shutdown on first message in queue
                    $self = $this;
                    register_shutdown_function(function () use ($self) {
                        $fn = $self->getExecFunction();
                        call_user_func($fn, $self->getMessages());
                    });
                }
            }
        }
    }
89996
public static void setLogStdOut(boolean log)
    {
        if (log)
        {
            if (!(System.out instanceof LogStream))
                System.setOut(new LogStream.STDOUT());
        }
        else
            System.setOut(STDOUT_STREAM);
    }