Primary method to handle logging.

@param mixed   $message  String or Exception object containing the message to log.
@param integer $severity The numeric severity.  Defaults to null so that no
assumptions are made about the logging backend.
9292
public function log($message, $severity = null)
    {
        if (is_null($this->logger)) {
            $this->logger = LogManager::getLogger('propel');
        }

        switch ($severity) {
            case 'crit':
                $method = 'fatal';
                break;
            case 'err':
                $method = 'error';
                break;
            case 'alert':
            case 'warning':
                $method = 'warning';
                break;
            case 'notice':
            case 'info':
                $method = 'info';
                break;
            case 'debug':
            default:
                $method = 'debug';
        }

        // get a backtrace to pass class, function, file, & line to Mojavi logger
        $trace = debug_backtrace();

        // call the appropriate Mojavi logger method
        $this->logger->{$method} (
            $message,
            $trace[2]['class'],
            $trace[2]['function'],
            $trace[1]['file'],
            $trace[1]['line']
            );
    }
24918
private function log($message, $party = null, $exception = false) {
		if (!$this->config->getDebugMode()) return;
		
		if (!$party) {
			$party = $message instanceof SmtpResponse ? 'server' : 'client';
		}
		// @todo: add logger possibility
		$eol = self::EOL;
		echo "SMTP " . strtoupper($party) . ":{$eol}{$message}{$eol}";
		
	}
760532
public function err( $message )
	{
		$ex = new Exception();
		echo $ex->getTraceAsString();

		if ( ! $this->log ) return;
		return $this->log->err( $message );
	}
138793
protected function log($message, $severity)
	{
		if (!empty($this->log_function))
		{
			if (isset($this->log_function[$severity]))
			{
				return call_user_func_array($this->log_function[$severity], array($message, $severity));
			}
			elseif (isset($this->log_function[self::LOG_LEVEL_ALL]))
			{
				return call_user_func_array($this->log_function[self::LOG_LEVEL_ALL], array($message, $severity));
			}
		}
		// Barracuda specific logging class, to keep internal code working
		elseif (method_exists('Log', 'message'))
		{
			return Log::message($message, $severity);
		}

		return true;
	}
941225
public function logException($e) {
		if(!$this->isLogging())
			return;

		#PSRException with a given severity
		if($e instanceof PSRException) {
			$severity = $e->getseverity();
			$msg = $e->getMessage();
		}
		#PHP exception
		elseif($e instanceof \ErrorException) {
			$severity = static::getPHPErrorSeverity($e->getCode());
			$msg = 'PHP ('.static::getPHPError($e->getCode()).'): '.$e->getMessage();
		}
		#other exception
		else {
			$severity = \Psr\Log\LogLevel::ERROR;
			$msg = get_class($e).': '.$e->getMessage();
		}

		$trace = $this->getBacktraceFromException($e);

		$this->log($severity, $msg, $e->getFile(), $e->getLine(), $e, $trace);
	}
1288857
protected function logWarning( $message )
    {
        $this->warnings[] = $message;

        // If we are showing progress output, we display the warnings
        // summarized after the other output (CLI)
        if ( $this->options->displayProgress )
        {
            return;
        }
        $this->emit( $message, 'warning' );
    }
664991
public function log($severity, $message, $file, $line, $exception=null, $trace=null) {
		if(!$this->isLogging())
			return;

		$context = [
			'exception' => $exception,
			'file' => $file,
			'line' => $line,
			'trace' => $trace,
		];
		$this->logger->log($severity, $message, $context);
	}
1164226
public function logFailure($message, \Exception $exception = null)
    {
        $this->buildLogger->logFailure($message, $exception);
    }
664737
public function mailLogging($line, $severity)
	{
		if (count($this->mailingList) > 0) {
		    $To = implode(', ', $this->mailingList);

			$Body			= $line;
			$Subject		= "[LOGGING] Severity: $severity";
			$CustomHeaders	= 'MIME-Version: 1.0' . "\r\n";
			$CustomHeaders	.= 'X-Priority: 1 (Highest)' . "\r\n";
			$CustomHeaders	.= 'X-MSMail-Priority: High' . "\r\n";
			$CustomHeaders	.= 'Importance: High' . "\r\n";
			$CustomHeaders 	.= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
			
			@mail($To, $Subject, $Body, $CustomHeaders);
		}
	}
379858
public function log($message)
    {

        if (!empty($this->log_file)) {
            //echo $message;
            \file_put_contents($this->log_file, "\n" . $message, \FILE_APPEND);
        }
    }
595547
public function critical(string $message, array $context = []){
        if($this->logger !== null){
            $this->logger->critical($message, $context);
        }

        if($this->messagePanel !== null){
            $this->messagePanel->addMessage($message, LogLevel::CRITICAL);
        }
    }
909255
private function logException($message, $exception)
    {
        return $this->app['logger.system']->error(
            $message . ': ' . $exception->getMessage(),
            ['event' => 'exception', 'exception' => $exception]
        );
    }
1200636
protected function write($message, $severity)
    {
        $this->getLogger()->log($this->getMagentoSeverity($severity), $message);
    }
1374749
private function log($message, $level)
    {
        // Only log if the logger is enabled.
        if (!$this->isEnabled) {
            return;
        }

        if ($level <= $this->level) {
            $requestId = null;
            try {
                $requestID = Application::getCurrent()->getRequestId();
            } catch (CoreException $exception) {
                $requestID = '---';
            }

            $logMessage = sprintf(
                '%s: %s [%s] %s' . PHP_EOL,
                $this->id,
                $requestId ?: '———',
                @self::$levelNames[$level],
                $message
            );

            // Commit the log message.
            if (empty($this->errorLogFile)) {
                // If no log file is specified, use the default PHP location.
                error_log($logMessage);
            } else {
                // Silence the eventual error if the message cannot be written
                // to the log, so that it doesn't interrupt the program.
                @file_put_contents(
                    $this->errorLogFile,
                    $logMessage,
                    FILE_APPEND
                );
            }
        }
    }
1140337
public function handler($severity, $message, $file, $line)
    {
        throw new ErrorException($message, 0, $severity, $file, $line);
    }
213421
protected function logException(\Exception $exception, $message)
    {
        if (null !== $this->logger) {
            if (!$exception instanceof HttpExceptionInterface || $exception->getStatusCode() >= 500) {
                $this->logger->critical($message, array('exception' => $exception));
            } else {
                $this->logger->error($message, array('exception' => $exception));
            }
        }
    }
1008115
protected function log($message): void
    {
        if ($this->logger !== null) {
            $this->logger->log($message);
        }
    }