Logs warning

@param string      $message
@param null|string $source
@param null|string $exception
@return bool
496819
public function logWarning(string $message = '', ?string $source = null, ?string $exception = null): bool
    {
        $ret = false;
        if ($this->logLevel & Log::LOG_WARNING) {
            $ret = $this->rawLog('[WARNING]', $message, $source, $exception);
        }
        return $ret;
    }
1260024
public function exceptionHandler(Exception $exception)
    {
        $this->logger->addError($exception->getMessage(), array($exception->getFile(), $exception->getLine()));
        exit(-1);
    }
302612
public function notice($messageOrException, $contextOrException = null, array $context = array()) {
        $this->log(LogLevel::NOTICE, $messageOrException, $contextOrException, $context);
    }
998714
protected function _logException(Exception $exception)
    {
        $config = $this->_options;
        $unwrapped = $exception instanceof PHP7ErrorException ?
            $exception->getError() :
            $exception;

        if (empty($config['log'])) {
            return false;
        }

        if (!empty($config['skipLog'])) {
            foreach ((array)$config['skipLog'] as $class) {
                if ($unwrapped instanceof $class) {
                    return false;
                }
            }
        }

        return Log::error($this->_getMessage($exception));
    }
819728
public function warn(
        $msg,
        array $args = array(),
        \Exception $exception = null
    ) {
        return $this->log(\Plop\WARN, $msg, $args, $exception);
    }
188695
public function log($level, $message, array $context = [])
    {
        $exception = isset($context['exception']) ? $context['exception'] : null;
        $microTime = microtime(true);
        $micro = sprintf("%06d", ($microTime - floor($microTime)) * 1000000);
        $logTime = (new \DateTime(date('Y-m-d H:i:s.' . $micro, $microTime)))->format('Y-m-d H:i:s.u');
        error_log(
            '[' . $logTime . '] '
            .$message.($exception ? ' {Exception: '.$exception->getMessage().'}' : '')."\n",
            3,
            $this->file,
            null
        );
    }
889952
private function _failOnErrorAction(Exception $exception = null, $message = '', $level = Project::MSG_INFO)
    {
        if ($this->_failonerror) {
            throw new BuildException(
                $exception !== null ? $exception : $message,
                $this->getLocation()
            );
        } else {
            $this->log(
                $exception !== null && $message === '' ? $exception->getMessage() : $message,
                $level
            );
        }
    }
1087970
public void logWarning(String message, Exception exception) {
        if (!(logWarning || globalLog.logWarning))
            return;

        if (warningLog != null)
            log(warningLog, "WARNING", owner, message, exception);
        else 
            log(globalLog.warningLog, "WARNING", owner, message, exception);
    }
897269
private function _haltOnErrorAction(Exception $exception = null, $message = '', $level = Project::MSG_INFO)
    {
        if ($this->_haltonerror) {
            throw new BuildException(
                $exception !== null ? $exception : $message,
                $this->getLocation()
            );
        } else {
            $this->log(
                $exception !== null && $message === '' ? $exception->getMessage() : $message,
                $level
            );
        }

    }
554604
protected function log(\Exception $exception)
    {
        if (null !== $this->logger) {
            $message = sprintf(
                '%s: %s (uncaught exception) at %s line %s',
                get_class($exception),
                $exception->getMessage(),
                $exception->getFile(),
                $exception->getLine()
            );

            $this->logger->error($message, array('exception' => $exception));
        }
    }
940614
public function logException(Exception $exception, $message = null)
    {
        $msg = $exception->getMessage();
        if ($message != null) {
            $msg = "Message: " . $message . " Exception: " . $msg;
        }
        $this->doLog(LogHelper::LOG_LEVEL_FATAL, $msg, null);
    }
805437
public function log($level, $message, array $context = []): void
    {
        if (!isset($this->logLevels[$level])) {
            $level = LogLevel::DEBUG;
        }

        $this->exceptionFile = null;

        if ($this->logLevels[$level] < $this->level) {
            return;
        }

        $exceptionFile = null;
        if (isset($context['exception']) && $context['exception'] instanceof \Throwable) {
            $exceptionFile = $this->getExceptionFile($context['exception']);
        }

        if (SEASLOG_EXTENSION) {
            $message .= $exceptionFile ? ' @@  ' . \basename($exceptionFile) : '';

            \SeasLog::log($level, $message, $context);
        } else {
            $message = Dumper::interpolate($message, $context);

            $line = static::formatLogLine($message, $exceptionFile);
            $file = $this->directory . '/' . $level . '.log';

            if (!@\file_put_contents($file, $line . PHP_EOL, FILE_APPEND | LOCK_EX)) { // @ is escalated to exception
                throw new \RuntimeException("Unable to write to log file '$file'. Is directory writable?");
            }
        }

        if ($exceptionFile) {
            $this->logException($context['exception'], $exceptionFile);
        }

        if (\in_array($level, [LogLevel::ERROR, LogLevel::EMERGENCY, LogLevel::CRITICAL, LogLevel::ALERT], true)) {
            $this->sendEmail($message);
        }

        $this->exceptionFile = $exceptionFile;
    }
372040
public function warn($message, array $context = array())
    {
        return $this->_instance->addRecord(\Monolog\Logger::WARNING, $message, $context);
    }
383040
public function warnIf($condition, $message = '')
    {
        $message = (strlen($message)) ? $message : 'Unknown Reason';

        if (true === $condition) {
            $this->outputWriter->write('    <warning>Warning during ' . $this->version->getExecutionState() . ': ' . $message . '</warning>');
        }
    }
1127224
private function printExceptionMessage($message, $migration)
    {
        $message = Color::red($message);
        $migration = Color::yellow($migration);

        exit(sprintf("\nOn %s\n\n%s\n\n", $migration, $message));
    }
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));
            }
        }
    }
784159
public void logDebug(String message, Exception exception) {
        if (!(logDebug || globalLog.logDebug))
            return;

        if (debugLog != null)
            log(debugLog, "DEBUG", owner, message, exception);
        else 
            log(globalLog.debugLog, "DEBUG", owner, message, exception);
    }