/var/www/vhosts/ahoradoovo.com.br/httpdocs/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php
* {@inheritdoc}
*/
protected function write(array $record)
{
if (!is_resource($this->stream)) {
if (null === $this->url || '' === $this->url) {
throw new \LogicException('Missing stream url, the stream can not be opened. This may be caused by a premature call to close().');
}
$this->createDir();
$this->errorMessage = null;
set_error_handler(array($this, 'customErrorHandler'));
$this->stream = fopen($this->url, 'a');
if ($this->filePermission !== null) {
@chmod($this->url, $this->filePermission);
}
restore_error_handler();
if (!is_resource($this->stream)) {
$this->stream = null;
throw new \UnexpectedValueException(sprintf('The stream or file "%s" could not be opened in append mode: '.$this->errorMessage, $this->url));
}
$this->streamSetChunkSize();
}
if ($this->useLocking) {
// ignoring errors here, there's not much we can do about them
flock($this->stream, LOCK_EX);
}
$this->streamWrite($this->stream, $record);
if ($this->useLocking) {
flock($this->stream, LOCK_UN);
}
}
/**
* Write to stream
* @param resource $stream
* @param array $record
Arguments
"The stream or file "/var/www/vhosts/ahoradoovo.com.br/httpdocs/storage/logs/laravel.log" could not be opened in append mode: failed to open stream: Permission denied"
/var/www/vhosts/ahoradoovo.com.br/httpdocs/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php
*
* @author Jordi Boggiano <j.boggiano@seld.be>
* @author Christophe Coevoet <stof@notk.org>
*/
abstract class AbstractProcessingHandler extends AbstractHandler
{
/**
* {@inheritdoc}
*/
public function handle(array $record)
{
if (!$this->isHandling($record)) {
return false;
}
$record = $this->processRecord($record);
$record['formatted'] = $this->getFormatter()->format($record);
$this->write($record);
return false === $this->bubble;
}
/**
* Writes the record down to the log of the implementing handler
*
* @param array $record
* @return void
*/
abstract protected function write(array $record);
/**
* Processes a record.
*
* @param array $record
* @return array
*/
protected function processRecord(array $record)
{
Arguments
array:8 [
"message" => "Unable to create configured logger. Using emergency logger."
"context" => array:1 [
"exception" => InvalidArgumentException {#30
#message: "Log [] is not defined."
#code: 0
#file: "/var/www/vhosts/ahoradoovo.com.br/httpdocs/vendor/laravel/framework/src/Illuminate/Log/LogManager.php"
#line: 181
}
]
"level" => 600
"level_name" => "EMERGENCY"
"channel" => "laravel"
"datetime" => DateTime @1744989433 {#292
date: 2025-04-18 12:17:13.225736 America/Sao_Paulo (-03:00)
}
"extra" => []
"formatted" => """
[2025-04-18 12:17:13] laravel.EMERGENCY: Unable to create configured logger. Using emergency logger. {"exception":"[object] (InvalidArgumentException(code: 0): Log [] is not defined. at /var/www/vhosts/ahoradoovo.com.br/httpdocs/vendor/laravel/framework/src/Illuminate/Log/LogManager.php:181)\n
[stacktrace]\n
#0 /var/www/vhosts/ahoradoovo.com.br/httpdocs/vendor/laravel/framework/src/Illuminate/Log/LogManager.php(115): Illuminate\\Log\\LogManager->resolve(NULL)\n
#1 /var/www/vhosts/ahoradoovo.com.br/httpdocs/vendor/laravel/framework/src/Illuminate/Log/LogManager.php(103): Illuminate\\Log\\LogManager->get(NULL)\n
#2 /var/www/vhosts/ahoradoovo.com.br/httpdocs/vendor/laravel/framework/src/Illuminate/Log/LogManager.php(526): Illuminate\\Log\\LogManager->driver()\n
#3 /var/www/vhosts/ahoradoovo.com.br/httpdocs/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(113): Illuminate\\Log\\LogManager->error('file_put_conten...', Array)\n
#4 /var/www/vhosts/ahoradoovo.com.br/httpdocs/app/Exceptions/Handler.php(38): Illuminate\\Foundation\\Exceptions\\Handler->report(Object(ErrorException))\n
#5 /var/www/vhosts/ahoradoovo.com.br/httpdocs/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(81): App\\Exceptions\\Handler->report(Object(ErrorException))\n
#6 [internal function]: Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleException(Object(ErrorException))\n
#7 {main}\n
"} \n
"""
]
/var/www/vhosts/ahoradoovo.com.br/httpdocs/vendor/monolog/monolog/src/Monolog/Logger.php
}
$ts->setTimezone(static::$timezone);
$record = array(
'message' => (string) $message,
'context' => $context,
'level' => $level,
'level_name' => $levelName,
'channel' => $this->name,
'datetime' => $ts,
'extra' => array(),
);
try {
foreach ($this->processors as $processor) {
$record = call_user_func($processor, $record);
}
while ($handler = current($this->handlers)) {
if (true === $handler->handle($record)) {
break;
}
next($this->handlers);
}
} catch (Exception $e) {
$this->handleException($e, $record);
}
return true;
}
/**
* Ends a log cycle and frees all resources used by handlers.
*
* Closing a Handler means flushing all buffers and freeing any open resources/handles.
* Handlers that have been closed should be able to accept log records again and re-open
* themselves on demand, but this may not always be possible depending on implementation.
*
* This is useful at the end of a request and will be called automatically on every handler
Arguments
array:8 [
"message" => "Unable to create configured logger. Using emergency logger."
"context" => array:1 [
"exception" => InvalidArgumentException {#30
#message: "Log [] is not defined."
#code: 0
#file: "/var/www/vhosts/ahoradoovo.com.br/httpdocs/vendor/laravel/framework/src/Illuminate/Log/LogManager.php"
#line: 181
}
]
"level" => 600
"level_name" => "EMERGENCY"
"channel" => "laravel"
"datetime" => DateTime @1744989433 {#292
date: 2025-04-18 12:17:13.225736 America/Sao_Paulo (-03:00)
}
"extra" => []
"formatted" => """
[2025-04-18 12:17:13] laravel.EMERGENCY: Unable to create configured logger. Using emergency logger. {"exception":"[object] (InvalidArgumentException(code: 0): Log [] is not defined. at /var/www/vhosts/ahoradoovo.com.br/httpdocs/vendor/laravel/framework/src/Illuminate/Log/LogManager.php:181)\n
[stacktrace]\n
#0 /var/www/vhosts/ahoradoovo.com.br/httpdocs/vendor/laravel/framework/src/Illuminate/Log/LogManager.php(115): Illuminate\\Log\\LogManager->resolve(NULL)\n
#1 /var/www/vhosts/ahoradoovo.com.br/httpdocs/vendor/laravel/framework/src/Illuminate/Log/LogManager.php(103): Illuminate\\Log\\LogManager->get(NULL)\n
#2 /var/www/vhosts/ahoradoovo.com.br/httpdocs/vendor/laravel/framework/src/Illuminate/Log/LogManager.php(526): Illuminate\\Log\\LogManager->driver()\n
#3 /var/www/vhosts/ahoradoovo.com.br/httpdocs/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(113): Illuminate\\Log\\LogManager->error('file_put_conten...', Array)\n
#4 /var/www/vhosts/ahoradoovo.com.br/httpdocs/app/Exceptions/Handler.php(38): Illuminate\\Foundation\\Exceptions\\Handler->report(Object(ErrorException))\n
#5 /var/www/vhosts/ahoradoovo.com.br/httpdocs/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(81): App\\Exceptions\\Handler->report(Object(ErrorException))\n
#6 [internal function]: Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleException(Object(ErrorException))\n
#7 {main}\n
"} \n
"""
]
/var/www/vhosts/ahoradoovo.com.br/httpdocs/vendor/monolog/monolog/src/Monolog/Logger.php
* @param array $context The log context
* @return bool Whether the record has been processed
*/
public function emerg($message, array $context = array())
{
return $this->addRecord(static::EMERGENCY, $message, $context);
}
/**
* Adds a log record at the EMERGENCY level.
*
* This method allows for compatibility with common interfaces.
*
* @param string $message The log message
* @param array $context The log context
* @return bool Whether the record has been processed
*/
public function emergency($message, array $context = array())
{
return $this->addRecord(static::EMERGENCY, $message, $context);
}
/**
* Set the timezone to be used for the timestamp of log records.
*
* This is stored globally for all Logger instances
*
* @param \DateTimeZone $tz Timezone object
*/
public static function setTimezone(\DateTimeZone $tz)
{
self::$timezone = $tz;
}
}
Arguments
600
"Unable to create configured logger. Using emergency logger."
array:1 [
"exception" => InvalidArgumentException {#30
#message: "Log [] is not defined."
#code: 0
#file: "/var/www/vhosts/ahoradoovo.com.br/httpdocs/vendor/laravel/framework/src/Illuminate/Log/LogManager.php"
#line: 181
}
]
/var/www/vhosts/ahoradoovo.com.br/httpdocs/vendor/laravel/framework/src/Illuminate/Log/Logger.php
* @return void
*/
public function write($level, $message, array $context = [])
{
$this->writeLog($level, $message, $context);
}
/**
* Write a message to the log.
*
* @param string $level
* @param string $message
* @param array $context
* @return void
*/
protected function writeLog($level, $message, $context)
{
$this->fireLogEvent($level, $message = $this->formatMessage($message), $context);
$this->logger->{$level}($message, $context);
}
/**
* Register a new callback handler for when a log event is triggered.
*
* @param \Closure $callback
* @return void
*
* @throws \RuntimeException
*/
public function listen(Closure $callback)
{
if (! isset($this->dispatcher)) {
throw new RuntimeException('Events dispatcher has not been set.');
}
$this->dispatcher->listen(MessageLogged::class, $callback);
}
/**
Arguments
"Unable to create configured logger. Using emergency logger."
array:1 [
"exception" => InvalidArgumentException {#30
#message: "Log [] is not defined."
#code: 0
#file: "/var/www/vhosts/ahoradoovo.com.br/httpdocs/vendor/laravel/framework/src/Illuminate/Log/LogManager.php"
#line: 181
}
]
/var/www/vhosts/ahoradoovo.com.br/httpdocs/vendor/laravel/framework/src/Illuminate/Log/Logger.php
* @param \Psr\Log\LoggerInterface $logger
* @param \Illuminate\Contracts\Events\Dispatcher|null $dispatcher
* @return void
*/
public function __construct(LoggerInterface $logger, Dispatcher $dispatcher = null)
{
$this->logger = $logger;
$this->dispatcher = $dispatcher;
}
/**
* Log an emergency message to the logs.
*
* @param string $message
* @param array $context
* @return void
*/
public function emergency($message, array $context = [])
{
$this->writeLog(__FUNCTION__, $message, $context);
}
/**
* Log an alert message to the logs.
*
* @param string $message
* @param array $context
* @return void
*/
public function alert($message, array $context = [])
{
$this->writeLog(__FUNCTION__, $message, $context);
}
/**
* Log a critical message to the logs.
*
* @param string $message
* @param array $context
* @return void
Arguments
"emergency"
"Unable to create configured logger. Using emergency logger."
array:1 [
"exception" => InvalidArgumentException {#30
#message: "Log [] is not defined."
#code: 0
#file: "/var/www/vhosts/ahoradoovo.com.br/httpdocs/vendor/laravel/framework/src/Illuminate/Log/LogManager.php"
#line: 181
}
]
/var/www/vhosts/ahoradoovo.com.br/httpdocs/vendor/laravel/framework/src/Illuminate/Log/LogManager.php
{
return $this->get($driver ?? $this->getDefaultDriver());
}
/**
* Attempt to get the log from the local cache.
*
* @param string $name
* @return \Psr\Log\LoggerInterface
*/
protected function get($name)
{
try {
return $this->channels[$name] ?? with($this->resolve($name), function ($logger) use ($name) {
return $this->channels[$name] = $this->tap($name, new Logger($logger, $this->app['events']));
});
} catch (Throwable $e) {
return tap($this->createEmergencyLogger(), function ($logger) use ($e) {
$logger->emergency('Unable to create configured logger. Using emergency logger.', [
'exception' => $e,
]);
});
}
}
/**
* Apply the configured taps for the logger.
*
* @param string $name
* @param \Illuminate\Log\Logger $logger
* @return \Illuminate\Log\Logger
*/
protected function tap($name, Logger $logger)
{
foreach ($this->configurationFor($name)['tap'] ?? [] as $tap) {
[$class, $arguments] = $this->parseTap($tap);
$this->app->make($class)->__invoke($logger, ...explode(',', $arguments));
}
Arguments
"Unable to create configured logger. Using emergency logger."
array:1 [
"exception" => InvalidArgumentException {#30
#message: "Log [] is not defined."
#code: 0
#file: "/var/www/vhosts/ahoradoovo.com.br/httpdocs/vendor/laravel/framework/src/Illuminate/Log/LogManager.php"
#line: 181
}
]
/var/www/vhosts/ahoradoovo.com.br/httpdocs/vendor/laravel/framework/src/Illuminate/Support/helpers.php
{
return Str::studly($value);
}
}
if (! function_exists('tap')) {
/**
* Call the given Closure with the given value then return the value.
*
* @param mixed $value
* @param callable|null $callback
* @return mixed
*/
function tap($value, $callback = null)
{
if (is_null($callback)) {
return new HigherOrderTapProxy($value);
}
$callback($value);
return $value;
}
}
if (! function_exists('throw_if')) {
/**
* Throw the given exception if the given condition is true.
*
* @param mixed $condition
* @param \Throwable|string $exception
* @param array ...$parameters
* @return mixed
* @throws \Throwable
*/
function throw_if($condition, $exception, ...$parameters)
{
if ($condition) {
throw (is_string($exception) ? new $exception(...$parameters) : $exception);
}
Arguments
Illuminate\Log\Logger {#296}
/var/www/vhosts/ahoradoovo.com.br/httpdocs/vendor/laravel/framework/src/Illuminate/Log/LogManager.php
}
/**
* Attempt to get the log from the local cache.
*
* @param string $name
* @return \Psr\Log\LoggerInterface
*/
protected function get($name)
{
try {
return $this->channels[$name] ?? with($this->resolve($name), function ($logger) use ($name) {
return $this->channels[$name] = $this->tap($name, new Logger($logger, $this->app['events']));
});
} catch (Throwable $e) {
return tap($this->createEmergencyLogger(), function ($logger) use ($e) {
$logger->emergency('Unable to create configured logger. Using emergency logger.', [
'exception' => $e,
]);
});
}
}
/**
* Apply the configured taps for the logger.
*
* @param string $name
* @param \Illuminate\Log\Logger $logger
* @return \Illuminate\Log\Logger
*/
protected function tap($name, Logger $logger)
{
foreach ($this->configurationFor($name)['tap'] ?? [] as $tap) {
[$class, $arguments] = $this->parseTap($tap);
$this->app->make($class)->__invoke($logger, ...explode(',', $arguments));
}
return $logger;
}
Arguments
Illuminate\Log\Logger {#296}
Closure($logger) {#31 …4}
/var/www/vhosts/ahoradoovo.com.br/httpdocs/vendor/laravel/framework/src/Illuminate/Log/LogManager.php
/**
* Get a log channel instance.
*
* @param string|null $channel
* @return mixed
*/
public function channel($channel = null)
{
return $this->driver($channel);
}
/**
* Get a log driver instance.
*
* @param string|null $driver
* @return mixed
*/
public function driver($driver = null)
{
return $this->get($driver ?? $this->getDefaultDriver());
}
/**
* Attempt to get the log from the local cache.
*
* @param string $name
* @return \Psr\Log\LoggerInterface
*/
protected function get($name)
{
try {
return $this->channels[$name] ?? with($this->resolve($name), function ($logger) use ($name) {
return $this->channels[$name] = $this->tap($name, new Logger($logger, $this->app['events']));
});
} catch (Throwable $e) {
return tap($this->createEmergencyLogger(), function ($logger) use ($e) {
$logger->emergency('Unable to create configured logger. Using emergency logger.', [
'exception' => $e,
]);
});
Arguments
/var/www/vhosts/ahoradoovo.com.br/httpdocs/vendor/laravel/framework/src/Illuminate/Log/LogManager.php
*
* @return void
*/
public function critical($message, array $context = [])
{
return $this->driver()->critical($message, $context);
}
/**
* Runtime errors that do not require immediate action but should typically
* be logged and monitored.
*
* @param string $message
* @param array $context
*
* @return void
*/
public function error($message, array $context = [])
{
return $this->driver()->error($message, $context);
}
/**
* Exceptional occurrences that are not errors.
*
* Example: Use of deprecated APIs, poor use of an API, undesirable things
* that are not necessarily wrong.
*
* @param string $message
* @param array $context
*
* @return void
*/
public function warning($message, array $context = [])
{
return $this->driver()->warning($message, $context);
}
/**
* Normal but significant events.
/var/www/vhosts/ahoradoovo.com.br/httpdocs/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php
*/
public function report(Exception $e)
{
if ($this->shouldntReport($e)) {
return;
}
if (method_exists($e, 'report')) {
return $e->report();
}
try {
$logger = $this->container->make(LoggerInterface::class);
} catch (Exception $ex) {
throw $e;
}
$logger->error(
$e->getMessage(),
array_merge($this->context(), ['exception' => $e]
));
}
/**
* Determine if the exception should be reported.
*
* @param \Exception $e
* @return bool
*/
public function shouldReport(Exception $e)
{
return ! $this->shouldntReport($e);
}
/**
* Determine if the exception is in the "do not report" list.
*
* @param \Exception $e
* @return bool
*/
Arguments
"file_put_contents(/var/www/vhosts/ahoradoovo.com.br/httpdocs/storage/framework/sessions/puIef5bbXqDtwOGD6pU7tcYIyoU8I60BSBbvYKu2): failed to open stream: Permission denied"
array:1 [
"exception" => ErrorException {#300
#message: "file_put_contents(/var/www/vhosts/ahoradoovo.com.br/httpdocs/storage/framework/sessions/puIef5bbXqDtwOGD6pU7tcYIyoU8I60BSBbvYKu2): failed to open stream: Permission denied"
#code: 0
#file: "/var/www/vhosts/ahoradoovo.com.br/httpdocs/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php"
#line: 122
#severity: E_WARNING
}
]
/var/www/vhosts/ahoradoovo.com.br/httpdocs/app/Exceptions/Handler.php
\Modules\Admin\Exceptions\AuthenticationException::class,
\Illuminate\Auth\AuthenticationException::class,
\Illuminate\Auth\Access\AuthorizationException::class,
\Symfony\Component\HttpKernel\Exception\HttpException::class,
\Illuminate\Database\Eloquent\ModelNotFoundException::class,
\Illuminate\Session\TokenMismatchException::class,
\Illuminate\Validation\ValidationException::class,
];
/**
* Report or log an exception.
*
* This is a great spot to send exceptions to Sentry, Bugsnag, etc.
*
* @param \Exception $exception
* @return void
*/
public function report(Exception $exception)
{
parent::report($exception);
}
/**
* Render an exception into an HTTP response.
*
* @param \Illuminate\Http\Request $request
* @param \Exception $exception
* @return \Illuminate\Http\Response
*/
public function render($request, Exception $exception)
{
$e = $this->prepareException($exception);
if ($e instanceof HttpResponseException) {
return $e->getResponse();
} elseif ($e instanceof AuthenticationException) {
return $this->unauthenticated($request, $e);
} elseif ($e instanceof AuthenticationExceptionAdm) {
return $this->unauthenticatedadm($request, $e);
} elseif ($e instanceof ValidationException) {
Arguments
ErrorException {#300
#message: "file_put_contents(/var/www/vhosts/ahoradoovo.com.br/httpdocs/storage/framework/sessions/puIef5bbXqDtwOGD6pU7tcYIyoU8I60BSBbvYKu2): failed to open stream: Permission denied"
#code: 0
#file: "/var/www/vhosts/ahoradoovo.com.br/httpdocs/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php"
#line: 122
#severity: E_WARNING
}
/var/www/vhosts/ahoradoovo.com.br/httpdocs/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php
}
/**
* Handle an uncaught exception from the application.
*
* Note: Most exceptions can be handled via the try / catch block in
* the HTTP and Console kernels. But, fatal error exceptions must
* be handled differently since they are not normal exceptions.
*
* @param \Throwable $e
* @return void
*/
public function handleException($e)
{
if (! $e instanceof Exception) {
$e = new FatalThrowableError($e);
}
try {
$this->getExceptionHandler()->report($e);
} catch (Exception $e) {
//
}
if ($this->app->runningInConsole()) {
$this->renderForConsole($e);
} else {
$this->renderHttpResponse($e);
}
}
/**
* Render an exception to the console.
*
* @param \Exception $e
* @return void
*/
protected function renderForConsole(Exception $e)
{
$this->getExceptionHandler()->renderForConsole(new ConsoleOutput, $e);
Arguments
ErrorException {#300
#message: "file_put_contents(/var/www/vhosts/ahoradoovo.com.br/httpdocs/storage/framework/sessions/puIef5bbXqDtwOGD6pU7tcYIyoU8I60BSBbvYKu2): failed to open stream: Permission denied"
#code: 0
#file: "/var/www/vhosts/ahoradoovo.com.br/httpdocs/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php"
#line: 122
#severity: E_WARNING
}
[internal]
Arguments
ErrorException {#300
#message: "file_put_contents(/var/www/vhosts/ahoradoovo.com.br/httpdocs/storage/framework/sessions/puIef5bbXqDtwOGD6pU7tcYIyoU8I60BSBbvYKu2): failed to open stream: Permission denied"
#code: 0
#file: "/var/www/vhosts/ahoradoovo.com.br/httpdocs/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php"
#line: 122
#severity: E_WARNING
}