{"id":13396091,"url":"https://github.com/spatie/laravel-tail","last_synced_at":"2025-04-14T02:58:29.021Z","repository":{"id":27139689,"uuid":"30608411","full_name":"spatie/laravel-tail","owner":"spatie","description":"An artisan command to tail your application logs","archived":false,"fork":false,"pushed_at":"2025-02-21T11:25:18.000Z","size":145,"stargazers_count":743,"open_issues_count":0,"forks_count":45,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-04-09T14:32:25.528Z","etag":null,"topics":["artisan","debug","laravel","log","php","tail"],"latest_commit_sha":null,"homepage":"https://freek.dev/111-the-missing-tail-command-for-laravel-5","language":"PHP","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"nedelec/cytosim","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spatie.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"custom":"https://spatie.be/open-source/support-us"}},"created_at":"2015-02-10T18:50:42.000Z","updated_at":"2025-04-04T04:41:02.000Z","dependencies_parsed_at":"2024-06-18T11:28:28.018Z","dependency_job_id":null,"html_url":"https://github.com/spatie/laravel-tail","commit_stats":{"total_commits":192,"total_committers":23,"mean_commits":8.347826086956522,"dds":"0.30729166666666663","last_synced_commit":"55e77620542e394b1661c1bf0afed444c50881b5"},"previous_names":[],"tags_count":38,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spatie%2Flaravel-tail","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spatie%2Flaravel-tail/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spatie%2Flaravel-tail/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spatie%2Flaravel-tail/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spatie","download_url":"https://codeload.github.com/spatie/laravel-tail/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248650429,"owners_count":21139672,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["artisan","debug","laravel","log","php","tail"],"created_at":"2024-07-30T18:00:39.727Z","updated_at":"2025-04-14T02:58:29.001Z","avatar_url":"https://github.com/spatie.png","language":"PHP","funding_links":["https://spatie.be/open-source/support-us"],"categories":["Popular Packages","Paquetes utiles","PHP","Developer \u0026 Debugging Tools","Resources"],"sub_categories":["Development Tools"],"readme":"# Easily tail your logs\n\n[![Latest Version](https://img.shields.io/github/release/spatie/laravel-tail.svg?style=flat-square)](https://github.com/spatie/laravel-tail/releases)\n[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)\n[![Total Downloads](https://img.shields.io/packagist/dt/spatie/laravel-tail.svg?style=flat-square)](https://packagist.org/packages/spatie/laravel-tail)\n\nThis package offers an artisan command to tail the application log. It supports daily and single logs on your local machine.\n\nTo tail the log you can use this command:\n\n```bash\nphp artisan tail\n```\n\nIt can also tail logs on other environments:\n\n```bash\nphp artisan tail production\n```\n\n## Support us\n\n[\u003cimg src=\"https://github-ads.s3.eu-central-1.amazonaws.com/laravel-tail.jpg?t=1\" width=\"419px\" /\u003e](https://spatie.be/github-ad-click/laravel-tail)\n\nWe invest a lot of resources into creating [best in class open source packages](https://spatie.be/open-source). You can support us by [buying one of our paid products](https://spatie.be/open-source/support-us).\n\nWe highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on [our contact page](https://spatie.be/about-us). We publish all received postcards on [our virtual postcard wall](https://spatie.be/open-source/postcards).\n\n## Installation\n\nYou can install the package via composer:\n\n``` bash\ncomposer require spatie/laravel-tail\n```\n\nYou can publish the config file with:\n```bash\nphp artisan vendor:publish --provider=\"Spatie\\Tail\\TailServiceProvider\"\n```\n\nThis is the contents of the file that will be published at `config/tail.php`:\n\n```php\nreturn [\n    'production' =\u003e [\n        \n        /*\n         * The host that contains your logs.\n         */\n        'host' =\u003e env('TAIL_HOST_PRODUCTION', ''),\n\n        /*\n         * The user to be used to SSH to the server.\n         */\n        'user' =\u003e env('TAIL_USER_PRODUCTION', ''),\n\n        /*\n         * The path to the directory that contains your logs.\n         */\n        'log_directory' =\u003e env('TAIL_LOG_DIRECTORY_PRODUCTION', ''),\n\n        /*\n         * The filename of the log file that you want to tail.\n         * Leave null to let the package automatically select the file.\n         */\n        'file' =\u003e env('TAIL_LOG_FILE_PRODUCTION', null),\n        \n    ],\n];\n```\n\n## Usage\n\nTo tail the local log you can use this command:\n\n```bash\nphp artisan tail\n```\n\nYou can start the output with displaying the last lines in the log by using the `lines`-option.\n\n```bash\nphp artisan tail --lines=50\n```\n\nBy default, the most-recently modified file in the directory will be used.\nYou can specify the file that you would like to tail by using the `file` option.\n\n```bash\nphp artisan tail --file=\"other-file.log\"\n```\n\nIt's also possible to fully clear the output buffer after each log item.\nThis can be useful if you're only interested in the last log entry when debugging.\n\n```bash\nphp artisan tail --clear\n```\n\nShould you wish to filter the log to return only certain keywords then you can also use the grep feature.\n\n```bash\nphp artisan tail --grep=\"only display lines that contain this string\"\n```\n\n### Tailing remote logs\n\nTo tail remote logs, you must first specify values for `host`, `user`, `log_directory`, and `file` keys of an environment in the `tail` config file.\n\nAfter that you can tail that logs of an environment like this\n\n```bash\nphp artisan tail production\n```\n\nYou can also use the `--clear`, `--file`, and `--lines` options described above.\n\n### Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](https://github.com/spatie/.github/blob/main/CONTRIBUTING.md) for details.\n\n## Security\n\nIf you've found a bug regarding security please mail [security@spatie.be](mailto:security@spatie.be) instead of using the issue tracker.\n\n## Credits\n\n- [Freek Van der Herten](https://github.com/freekmurze)\n- [All Contributors](../../contributors)\n\nThis package was created because [the awesome tail command present in Laravel 4](https://github.com/laravel/framework/blob/4.2/src/Illuminate/Foundation/Console/TailCommand.php) was dropped in Laravel 5. The tail command from this package is equivalent to Laravel's old one minus the remote tailing features.\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspatie%2Flaravel-tail","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspatie%2Flaravel-tail","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspatie%2Flaravel-tail/lists"}