Giter Site home page Giter Site logo

pail's Introduction

Pail Package Logo

Build Status Total Downloads Latest Stable Version License

Introduction

Laravel Pail is a package that allows you to easily dive into your Laravel application's log files directly from the command line. Unlike other log tailing packages, Pail is designed to work with any log driver, including Sentry or Flare.

In addition, Pail focuses on the developer experience: it provides a sleek CLI interface with a user-friendly design and a set of useful filters to help you find what you're looking for.

Official Documentation

Documentation for Pail can be found on the Laravel website.

Contributing

Thank you for considering contributing to Pail! The contribution guide can be found in the Laravel documentation.

Code of Conduct

In order to ensure that the Laravel community is welcoming to all, please review and abide by the Code of Conduct.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

License

Laravel Pail is open-sourced software licensed under the MIT license.

pail's People

Contributors

baspa avatar crynobone avatar cyppe avatar driesvints avatar jubeki avatar milewski avatar nunomaduro avatar taylorotwell avatar timacdonald avatar xico2k avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pail's Issues

Configurable timeout

Would be nice to be able to set parameter for changing default timeout value when needed:

INFO Maximum execution time exceeded.

Currently it's hardcoded:

Process::timeout(3600)

Something like

php artisan pail --timeout=10000

or

php artisan pail --notimeout

Would be nice.

Thanks for a awesome tool!

Pail generates an error when log context contains an "exception" key with a string value

Laravel Package Version

1.0.0

Laravel Version

10.33.0

PHP Version

8.2.12

Database Driver & Version

No response

Description

If a log contains a context with a key named "exception" but its value is not an exception (eg. a string), it generates an error :
Error Call to a member function getTrace() on string.

The error occurs on the main app, pail doesn't show anything.

Steps To Reproduce

try {
    throw new \Exception("exception message");
} catch (\Exception $e) {
    // ok
    Log::error('log message', ['exception' => $e]);
    // crash
    Log::error('log message', ['exception' => 'an exception occured']);
}

start the output with displaying the last lines in the log

It would be useful if there was something similar to the spatie/laravel-tail packages --lines=X command option to start the tail with previous lines.

With the included ability to add either -v or -vv options as well

At the moment if you forget to start pail or have it running but forgot to add the verbosity level you have to recreate the error before you can see it in the logs.

Style [gmail-zeroclipboard-container] not found.

Laravel Package Version

1.0@beta

Laravel Version

10.28.0

PHP Version

8.2

Database Driver & Version

No response

Description

I'm not sure if this is an actual bug of Laravel Pail, but I just tried to log the output of an email using the package. I did it like this:

logger()->info('InsertMessageDetailToMessage', [
    ...$data,
]);

This is the raw content of the email:

<div dir=3D"ltr"><div class=3D"gmail-highlight gmail-highlight-source-shell=
 gmail-notranslate gmail-position-relative gmail-overflow-auto" dir=3D"auto=
" style=3D"box-sizing:border-box;margin-bottom:16px;color:rgb(173,186,199);=
font-family:-apple-system,&quot;system-ui&quot;,&quot;Segoe UI&quot;,&quot;=
Noto Sans&quot;,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&q=
uot;Segoe UI Emoji&quot;;font-size:16px;background-color:rgb(34,39,46);over=
flow:auto"><pre style=3D"box-sizing:border-box;font-family:ui-monospace,SFM=
ono-Regular,&quot;SF Mono&quot;,Menlo,Consolas,&quot;Liberation Mono&quot;,=
monospace;font-size:13.6px;margin-top:0px;margin-bottom:0px;padding:16px;ov=
erflow:auto;line-height:1.45;border-radius:6px;word-break:normal">php artis=
an pail</pre><div class=3D"gmail-zeroclipboard-container gmail-position-abs=
olute gmail-right-0 gmail-top-0" style=3D"box-sizing:border-box"></div></di=
v><br class=3D"gmail-Apple-interchange-newline"></div>

Which results in the following error:

Termwind\Exceptions\StyleNotFound: Style [gmail-zeroclipboard-container] not found.

Steps To Reproduce

Step 1

Create an Laravel Pail log using this data:

<div dir=3D"ltr"><div class=3D"gmail-highlight gmail-highlight-source-shell=
 gmail-notranslate gmail-position-relative gmail-overflow-auto" dir=3D"auto=
" style=3D"box-sizing:border-box;margin-bottom:16px;color:rgb(173,186,199);=
font-family:-apple-system,&quot;system-ui&quot;,&quot;Segoe UI&quot;,&quot;=
Noto Sans&quot;,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&q=
uot;Segoe UI Emoji&quot;;font-size:16px;background-color:rgb(34,39,46);over=
flow:auto"><pre style=3D"box-sizing:border-box;font-family:ui-monospace,SFM=
ono-Regular,&quot;SF Mono&quot;,Menlo,Consolas,&quot;Liberation Mono&quot;,=
monospace;font-size:13.6px;margin-top:0px;margin-bottom:0px;padding:16px;ov=
erflow:auto;line-height:1.45;border-radius:6px;word-break:normal">php artis=
an pail</pre><div class=3D"gmail-zeroclipboard-container gmail-position-abs=
olute gmail-right-0 gmail-top-0" style=3D"box-sizing:border-box"></div></di=
v><br class=3D"gmail-Apple-interchange-newline"></div>

and log it like this:

logger()->info('log', [
    $html,
]);

displaying arrays

i assume the current state is wanted, but because it looks very strange to me, I just wanted to mention it:

this....

Log::debug('test',['test' => 'test', 'test2' => 'test2','test3' => 'test3']);

produces this:

image

and I personally would expect an output where the array gets displayed like dump(...) does:

image

so itΒ΄s readable for a human. ideas ?

Pail Crashes

Laravel Package Version

dev-main

Laravel Version

10.25

PHP Version

8.2.10

Database Driver & Version

None

Description

Hi,

I'm receiving the following error (with stacktrace) when i execute pail without any additional arguments on our staging server:

PHP Fatal error: Uncaught JsonException: Syntax error in /home/user/projects/ingest/vendor/laravel/pail/src/ValueObjects/MessageLogged.php:30
Stack trace:
#0 /home/user/projects/ingest/vendor/laravel/pail/src/ValueObjects/MessageLogged.php(30): json_decode()
#1 /home/user/projects/ingest/vendor/laravel/pail/src/ProcessFactory.php(28): Laravel\Pail\ValueObjects\MessageLogged::fromJson()
#2 [internal function]: Laravel\Pail\ProcessFactory->Laravel\Pail{closure}()
#3 /home/user/projects/ingest/vendor/laravel/framework/src/Illuminate/Collections/Arr.php(558): array_map()
#4 /home/user/projects/ingest/vendor/laravel/framework/src/Illuminate/Collections/Collection.php(777): Illuminate\Support\Arr::map()
#5 /home/user/projects/ingest/vendor/laravel/pail/src/ProcessFactory.php(28): Illuminate\Support\Collection->map()
#6 /home/user/projects/ingest/vendor/symfony/process/Process.php(1276): Laravel\Pail\ProcessFactory->Laravel\Pail{closure}()
#7 /home/user/projects/ingest/vendor/symfony/process/Process.php(1376): Symfony\Component\Process\Process->Symfony\Component\Process{closure}()
#8 /home/user/projects/ingest/vendor/symfony/process/Process.php(1296): Symfony\Component\Process\Process->readPipes()
#9 /home/user/projects/ingest/vendor/symfony/process/Process.php(840): Symfony\Component\Process\Process->updateStatus()
#10 /home/user/projects/ingest/vendor/symfony/process/Process.php(886): Symfony\Component\Process\Process->isRunning()
#11 /home/user/projects/ingest/vendor/symfony/process/Process.php(213): Symfony\Component\Process\Process->stop()
#12 [internal function]: Symfony\Component\Process\Process->__destruct()
#13 {main}
thrown in /home/user/projects/ingest/vendor/laravel/pail/src/ValueObjects/MessageLogged.php on line 30

In local development everything seems to be working just fine.

Steps To Reproduce

executed php artisan pail.

Style [sf-dump] not found

Laravel Package Version

v1.0.0-beta.2

Laravel Version

10.23.1

PHP Version

8.2

Database Driver & Version

No response

Description

I'm running the php artisan:pail command. I accidentally added an "s" somewhere in my code which caused Pail to throw the following error:

Style [sf-dump] not found.

  at vendor/nunomaduro/termwind/src/Exceptions/StyleNotFound.php:27
     23β–•      * Creates a new style not found instance from the given style.
     24β–•      */
     25β–•     public static function fromStyle(string $style): self
     26β–•     {
  ➜  27β–•         return new self(sprintf('Style [%s] not found.', $style));
     28β–•     }
     29β–• }
     30β–• 

Steps To Reproduce

  1. Run php artisan:pail

  2. Call a route which leads to a controller method that contains a random character in it. For example:

public function index(Request $request): array
{
    $data = [];
    s
    return $data;
}

[Suggestion] Keyboard Shortcut

Hey, Nuno! Thanks for this awesome package.

I'd like to suggest a new feature:

  • Provide the ability to use a keyboard shortcut to restart the pail: Cmd or Alt + P, for example. Also, I think it'd be awesome to be able to change the keyboard shortcut as part of one config/pail.php file.

report() helper not picked up by pail

Laravel Package Version

1.0.0-beta.1

Laravel Version

10.26.2

PHP Version

8.2.11

Database Driver & Version

MySQL 5.7.39 using MAMP Pro 6

Description

Pretty cool package, thanks for your hard work on this, however i seem to maybe come across an issue!

When using Laravel's report() helper as below.

report('message');

Using php artisan pail -vv does not display the exception when tailing the logs.

Steps To Reproduce

Add a route so the report helper is ran.

Route::get('report-helper-test', function(){
       report('message');
   });

Run php artisan pail -vv in your terminal.

Then open the /route report-helper-test

The exception logs fine within laravels error logs.

[2023-10-08 10:11:02] local.ERROR: message {"userId":1,"exception":"[object] (Exception(code: 0): message at /Users/jonathan/Code/..../vendor/laravel/framework/src/Illuminate/Foundation/helpers.php:663)
[stacktrace]
#0 /Users/jonathan/Code/.../routes/booking/tenant.php(9): report('message')

However, the logs being tailed do not pick up this exception.

Pail crashes jobs with a lot of Log::debug() output

Laravel Package Version

1.1.0

Laravel Version

10.41.0

PHP Version

PHP 8.2.14

Database Driver & Version

No response

Description

I noticed an issue that if I terminate Pail (ctrl+c) when I have a Job running that sends a lot of logs to Log::debug() so basically Laravel Pail is lagging behind vs how fast the logs comes in laravel.log if I also tail it in the same time I can see that Pail probably is 10 seconds behind the realtime logs.

So basically I terminate Pail (ctrl+c) and as I also tail -f storage/laravel.log I see instantly that my job is killed with exception:

[2024-01-24 11:00:40] local.ERROR: Job failed on attempt 2 due to: **filemtime(): stat failed** for /Users/thomasandersson/PhpstormProjects/motoaction_new_generate/storage/pail/**65b0ed6061aa6.pail**
[2024-01-24 11:00:40] local.ERROR: filemtime(): stat failed for /Users/thomasandersson/PhpstormProjects/motoaction_new_generate/storage/pail/65b0ed6061aa6.pail {"exception":"[object] (ErrorException(code: 0): filemtime(): stat failed for /Users/thomasandersson/PhpstormProjects/motoaction_new_generate/storage/pail/65b0ed6061aa6.pail at /Users/thomasandersson/PhpstormProjects/motoaction_new_generate/vendor/laravel/pail/src/File.php:90)

Full output including a few lines from Log::debug() logs:


[2024-01-24 11:00:39] local.DEBUG: Chunk: 193 - Before addProduct - Current Memory Usage: 964 MB
[2024-01-24 11:00:39] local.DEBUG: Chunk: 193 - finished addProduct - Current Memory Usage: 964 MB
[2024-01-24 11:00:39] local.DEBUG: Chunk: 193 - Before mapRedisCacheProductToEsales - Current Memory Usage: 964 MB
[2024-01-24 11:00:39] local.DEBUG: Chunk: 193 - Before addProduct - Current Memory Usage: 964 MB
[2024-01-24 11:00:40] local.DEBUG: Chunk: 193 - finished addProduct - Current Memory Usage: 964 MB
[2024-01-24 11:00:40] local.DEBUG: Chunk: 193 - Before mapRedisCacheProductToEsales - Current Memory Usage: 964 MB
[2024-01-24 11:00:40] local.DEBUG: Chunk: 193 - Before addProduct - Current Memory Usage: 964 MB
[2024-01-24 11:00:40] local.DEBUG: Chunk: 193 - finished addProduct - Current Memory Usage: 964 MB
[2024-01-24 11:00:40] local.DEBUG: Chunk: 193 - Before mapRedisCacheProductToEsales - Current Memory Usage: 964 MB
[2024-01-24 11:00:40] local.DEBUG: Chunk: 193 - Before addProduct - Current Memory Usage: 964 MB
[2024-01-24 11:00:40] local.DEBUG: Chunk: 193 - finished addProduct - Current Memory Usage: 964 MB
[2024-01-24 11:00:40] local.ERROR: Job failed on attempt 2 due to: filemtime(): stat failed for /Users/thomasandersson/PhpstormProjects/motoaction_new_generate/storage/pail/65b0ed6061aa6.pail
[2024-01-24 11:00:40] local.ERROR: filemtime(): stat failed for /Users/thomasandersson/PhpstormProjects/motoaction_new_generate/storage/pail/65b0ed6061aa6.pail {"exception":"[object] (ErrorException(code: 0): filemtime(): stat failed for /Users/thomasandersson/PhpstormProjects/motoaction_new_generate/storage/pail/65b0ed6061aa6.pail at /Users/thomasandersson/PhpstormProjects/motoaction_new_generate/vendor/laravel/pail/src/File.php:90)
[stacktrace]
#0 /Users/thomasandersson/PhpstormProjects/motoaction_new_generate/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(255): Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleError(2, 'filemtime(): st...', '/Users/thomasan...', 90)
#1 [internal function]: Illuminate\\Foundation\\Bootstrap\\HandleExceptions->Illuminate\\Foundation\\Bootstrap\\{closure}(2, 'filemtime(): st...', '/Users/thomasan...', 90)
#2 /Users/thomasandersson/PhpstormProjects/motoaction_new_generate/vendor/laravel/pail/src/File.php(90): filemtime('/Users/thomasan...')
#3 /Users/thomasandersson/PhpstormProjects/motoaction_new_generate/vendor/laravel/pail/src/File.php(64): Laravel\\Pail\\File->isStale()
#4 /Users/thomasandersson/PhpstormProjects/motoaction_new_generate/vendor/laravel/pail/src/Handler.php(49): Laravel\\Pail\\File->log('debug', 'Chunk: 193 - fi...', Array)
#5 /Users/thomasandersson/PhpstormProjects/motoaction_new_generate/vendor/laravel/framework/src/Illuminate/Collections/Traits/EnumeratesValues.php(240): Laravel\\Pail\\Handler->Laravel\\Pail\\{closure}(Object(Laravel\\Pail\\File), 1)
#6 /Users/thomasandersson/PhpstormProjects/motoaction_new_generate/vendor/laravel/pail/src/Handler.php(48): Illuminate\\Support\\Collection->each(Object(Closure))
#7 /Users/thomasandersson/PhpstormProjects/motoaction_new_generate/vendor/laravel/pail/src/PailServiceProvider.php(48): Laravel\\Pail\\Handler->log(Object(Illuminate\\Log\\Events\\MessageLogged))
#8 /Users/thomasandersson/PhpstormProjects/motoaction_new_generate/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(458): Laravel\\Pail\\PailServiceProvider->Laravel\\Pail\\{closure}(Object(Illuminate\\Log\\Events\\MessageLogged))
#9 /Users/thomasandersson/PhpstormProjects/motoaction_new_generate/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(286): Illuminate\\Events\\Dispatcher->Illuminate\\Events\\{closure}('Illuminate\\\\Log\\\\...', Array)
#10 /Users/thomasandersson/PhpstormProjects/motoaction_new_generate/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(266): Illuminate\\Events\\Dispatcher->invokeListeners('Illuminate\\\\Log\\\\...', Array, false)
#11 /Users/thomasandersson/PhpstormProjects/motoaction_new_generate/vendor/laravel/framework/src/Illuminate/Log/Logger.php(248): Illuminate\\Events\\Dispatcher->dispatch('Illuminate\\\\Log\\\\...')
#12 /Users/thomasandersson/PhpstormProjects/motoaction_new_generate/vendor/laravel/framework/src/Illuminate/Log/Logger.php(189): Illuminate\\Log\\Logger->fireLogEvent('debug', 'Chunk: 193 - fi...', Array)
#13 /Users/thomasandersson/PhpstormProjects/motoaction_new_generate/vendor/laravel/framework/src/Illuminate/Log/Logger.php(145): Illuminate\\Log\\Logger->writeLog('debug', 'Chunk: 193 - fi...', Array)
#14 /Users/thomasandersson/PhpstormProjects/motoaction_new_generate/vendor/laravel/framework/src/Illuminate/Log/LogManager.php(734): Illuminate\\Log\\Logger->debug('Chunk: 193 - fi...', Array)
#15 /Users/thomasandersson/PhpstormProjects/motoaction_new_generate/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(355): Illuminate\\Log\\LogManager->debug('Chunk: 193 - fi...')
#16 /Users/thomasandersson/PhpstormProjects/motoaction_new_generate/app/Jobs/ImportProductsToEsalesJob.php(152): Illuminate\\Support\\Facades\\Facade::__callStatic('debug', Array)
#17 /Users/thomasandersson/PhpstormProjects/motoaction_new_generate/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): App\\Jobs\\ImportProductsToEsalesJob->handle()
#18 /Users/thomasandersson/PhpstormProjects/motoaction_new_generate/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#19 /Users/thomasandersson/PhpstormProjects/motoaction_new_generate/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure(Object(Closure))
#20 /Users/thomasandersson/PhpstormProjects/motoaction_new_generate/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Array, Object(Closure))
#21 /Users/thomasandersson/PhpstormProjects/motoaction_new_generate/vendor/laravel/framework/src/Illuminate/Container/Container.php(662): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Array, Array, NULL)
#22 /Users/thomasandersson/PhpstormProjects/motoaction_new_generate/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(128): Illuminate\\Container\\Container->call(Array)
#23 /Users/thomasandersson/PhpstormProjects/motoaction_new_generate/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(144): Illuminate\\Bus\\Dispatcher->Illuminate\\Bus\\{closure}(Object(App\\Jobs\\ImportProductsToEsalesJob))
#24 /Users/thomasandersson/PhpstormProjects/motoaction_new_generate/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(App\\Jobs\\ImportProductsToEsalesJob))
#25 /Users/thomasandersson/PhpstormProjects/motoaction_new_generate/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(132): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#26 /Users/thomasandersson/PhpstormProjects/motoaction_new_generate/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(123): Illuminate\\Bus\\Dispatcher->dispatchNow(Object(App\\Jobs\\ImportProductsToEsalesJob), false)
#27 /Users/thomasandersson/PhpstormProjects/motoaction_new_generate/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(144): Illuminate\\Queue\\CallQueuedHandler->Illuminate\\Queue\\{closure}(Object(App\\Jobs\\ImportProductsToEsalesJob))
#28 /Users/thomasandersson/PhpstormProjects/motoaction_new_generate/app/Jobs/Middleware/CustomWithoutOverlapping.php(28): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(App\\Jobs\\ImportProductsToEsalesJob))
#29 /Users/thomasandersson/PhpstormProjects/motoaction_new_generate/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): App\\Jobs\\Middleware\\CustomWithoutOverlapping->handle(Object(App\\Jobs\\ImportProductsToEsalesJob), Object(Closure))
#30 /Users/thomasandersson/PhpstormProjects/motoaction_new_generate/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(App\\Jobs\\ImportProductsToEsalesJob))
#31 /Users/thomasandersson/PhpstormProjects/motoaction_new_generate/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(122): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#32 /Users/thomasandersson/PhpstormProjects/motoaction_new_generate/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(70): Illuminate\\Queue\\CallQueuedHandler->dispatchThroughMiddleware(Object(Illuminate\\Queue\\Jobs\\RedisJob), Object(App\\Jobs\\ImportProductsToEsalesJob))
#33 /Users/thomasandersson/PhpstormProjects/motoaction_new_generate/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php(102): Illuminate\\Queue\\CallQueuedHandler->call(Object(Illuminate\\Queue\\Jobs\\RedisJob), Array)
#34 /Users/thomasandersson/PhpstormProjects/motoaction_new_generate/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(439): Illuminate\\Queue\\Jobs\\Job->fire()
#35 /Users/thomasandersson/PhpstormProjects/motoaction_new_generate/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(389): Illuminate\\Queue\\Worker->process('redis', Object(Illuminate\\Queue\\Jobs\\RedisJob), Object(Illuminate\\Queue\\WorkerOptions))
#36 /Users/thomasandersson/PhpstormProjects/motoaction_new_generate/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(176): Illuminate\\Queue\\Worker->runJob(Object(Illuminate\\Queue\\Jobs\\RedisJob), 'redis', Object(Illuminate\\Queue\\WorkerOptions))
#37 /Users/thomasandersson/PhpstormProjects/motoaction_new_generate/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(137): Illuminate\\Queue\\Worker->daemon('redis', 'esales', Object(Illuminate\\Queue\\WorkerOptions))
#38 /Users/thomasandersson/PhpstormProjects/motoaction_new_generate/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(120): Illuminate\\Queue\\Console\\WorkCommand->runWorker('redis', 'esales')
#39 /Users/thomasandersson/PhpstormProjects/motoaction_new_generate/vendor/laravel/horizon/src/Console/WorkCommand.php(51): Illuminate\\Queue\\Console\\WorkCommand->handle()
#40 /Users/thomasandersson/PhpstormProjects/motoaction_new_generate/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Laravel\\Horizon\\Console\\WorkCommand->handle()
#41 /Users/thomasandersson/PhpstormProjects/motoaction_new_generate/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#42 /Users/thomasandersson/PhpstormProjects/motoaction_new_generate/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure(Object(Closure))
#43 /Users/thomasandersson/PhpstormProjects/motoaction_new_generate/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Array, Object(Closure))
#44 /Users/thomasandersson/PhpstormProjects/motoaction_new_generate/vendor/laravel/framework/src/Illuminate/Container/Container.php(662): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Array, Array, NULL)
#45 /Users/thomasandersson/PhpstormProjects/motoaction_new_generate/vendor/laravel/framework/src/Illuminate/Console/Command.php(211): Illuminate\\Container\\Container->call(Array)
#46 /Users/thomasandersson/PhpstormProjects/motoaction_new_generate/vendor/symfony/console/Command/Command.php(326): Illuminate\\Console\\Command->execute(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Illuminate\\Console\\OutputStyle))
#47 /Users/thomasandersson/PhpstormProjects/motoaction_new_generate/vendor/laravel/framework/src/Illuminate/Console/Command.php(180): Symfony\\Component\\Console\\Command\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Illuminate\\Console\\OutputStyle))
#48 /Users/thomasandersson/PhpstormProjects/motoaction_new_generate/vendor/symfony/console/Application.php(1096): Illuminate\\Console\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#49 /Users/thomasandersson/PhpstormProjects/motoaction_new_generate/vendor/symfony/console/Application.php(324): Symfony\\Component\\Console\\Application->doRunCommand(Object(Laravel\\Horizon\\Console\\WorkCommand), Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#50 /Users/thomasandersson/PhpstormProjects/motoaction_new_generate/vendor/symfony/console/Application.php(175): Symfony\\Component\\Console\\Application->doRun(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#51 /Users/thomasandersson/PhpstormProjects/motoaction_new_generate/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(201): Symfony\\Component\\Console\\Application->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#52 /Users/thomasandersson/PhpstormProjects/motoaction_new_generate/artisan(35): Illuminate\\Foundation\\Console\\Kernel->handle(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#53 {main}
"}


Steps To Reproduce

  1. Create a job that sends a LOT of Log::debug("Something"); Potentially need to catch exception and send to log.
  2. Have laravel pail running
  3. Dispatch job and look at the flood of logs in laravel pail.
  4. Terminate Pail with ctrl+c
  5. Look at laravel logs and see that job died due to exception described above (filemtime(): stat failed for /...../storage/pail/65b0ed6061aa6.pail)

Logs issued from tests do not show up

Laravel Package Version

1.0.0-beta.2

Laravel Version

10.28.0

PHP Version

8.2.9

Database Driver & Version

No response

Description

Hello! I have just installed Laravel Pail as a development dependency.

The logs written from inside PHPUnit tests do not show up in Pail output.
Even though it works fine when issued from an HTTP controller or Tinker.
The logs are correctly appended to my log file (storage/logs/laravel.log).

Steps To Reproduce

  1. Add logger()->info('this is a test'); at the beginning of a test.
  2. Start Pail.
  3. Run the tests with php artisan test.
  4. "this is a test" does NOT appear in Pail's output.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.