You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would love to see a way to easily read and tail logs inside a ⛵Sail container. This can improve the developer experience and aligns with Sail's philosophy of simplifying Docker's complexity for Laravel developers.
I can imagine a number of new Sail commands such as:
sail log (or a possible alias sail log:docker) could be a helpful way to view the logs written to STDOUT and STDERR when sail is running in detached mode.
sail log:laravel can allow an easy way to peer into Laravel's logs without having to exec or ssh into the container
sail log:laravel --file=filename can let you view other logs saved in storage/logs
sail log:laravel can perhaps use Pail if it is installed and support passing options to it (e.g., level, message, filter, etc.)
My above suggested implementation defaults to always tail and follow (i.e., tail -f) as that seems to be the most common behavior when viewing logs in a development environment. Additional options to sail log can be added to view entire logs instead of just the tail, tail without following, etc.
If this is interesting, I would love to discuss more, flesh the API a bit more, and then start working on an implementation.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I would love to see a way to easily read and tail logs inside a ⛵Sail container. This can improve the developer experience and aligns with Sail's philosophy of simplifying Docker's complexity for Laravel developers.
I can imagine a number of new Sail commands such as:
The above examples would translate to something like:
Notes:
sail log
(or a possible aliassail log:docker
) could be a helpful way to view the logs written to STDOUT and STDERR when sail is running in detached mode.sail log:laravel
can allow an easy way to peer into Laravel's logs without having to exec or ssh into the containersail log:laravel --file=filename
can let you view other logs saved instorage/logs
sail log:laravel
can perhaps use Pail if it is installed and support passing options to it (e.g.,level
,message
,filter
, etc.)tail -f
) as that seems to be the most common behavior when viewing logs in a development environment. Additional options tosail log
can be added to view entire logs instead of just the tail, tail without following, etc.If this is interesting, I would love to discuss more, flesh the API a bit more, and then start working on an implementation.
Beta Was this translation helpful? Give feedback.
All reactions