Download the PHP package vocweb/laravel-log-compress without Composer

On this page you can find all versions of the php package vocweb/laravel-log-compress. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-log-compress

Laravel Log Compress

Automatically compress daily-rotated Laravel log files to tar.gz archives with optional AES-256 password encryption. Reduce storage costs and simplify log management.

Features

Requirements

Component Version
PHP 8.1+
Laravel 10.x, 11.x, 12.x, 13.x
System Tools tar, openssl (for encryption)

Typical Linux/macOS installations have both tools. Windows requires GNU tar/openssl.

Installation

Via Composer

The package auto-registers via Laravel's package discovery.

Publish Configuration (Optional)

This creates config/log-compress.php in your Laravel project.

Configuration

Environment Variables

Add to your .env file:

Configuration File

Edit config/log-compress.php:

Usage

Manual Compression

Compress all eligible daily log files:

With Password Override

Encrypt archives with a specific password (overrides config):

Auto-Scheduled Execution

By default, the package automatically registers a daily scheduled task to compress logs. No manual setup required — just ensure your Laravel scheduler is running:

Configure Auto-Schedule

Via .env:

Manual Schedule (if auto-schedule is disabled)

If you set LOG_COMPRESS_AUTO_SCHEDULE=false, register the schedule manually:

Laravel 10 — app/Console/Kernel.php:

Laravel 11 — routes/console.php:

Laravel 12 / 13 — bootstrap/app.php:

How It Works

Discovery

  1. Scans all channels in config/logging.php
  2. Identifies channels with driver: daily

Selection

  1. For each daily channel, finds log files:
    • Pattern: {base_path}-YYYY-MM-DD.log
    • Age: older than older_than_days setting
    • Status: not already compressed

Compression

  1. Creates tar.gz archive using system tar command
  2. If password configured: encrypts with OpenSSL AES-256-CBC
  3. Cleans up partial files on failure

Cleanup

  1. Deletes original log file (if delete_after_compress: true)
  2. Reports count of compressed files and any errors

Decrypting Encrypted Archives

If you encrypted logs with a password, decrypt them:

Example Workflow

Setup

Daily Operation

Retrieve Old Logs

Logging Configuration

Ensure you have a daily channel in config/logging.php:

Multiple daily channels are supported and will all be compressed.

Output & Status Codes

Successful Compression

Exit code: 0

No Files Found

Exit code: 0

With Errors

Exit code: 1

Security Notes

Troubleshooting

"tar: command not found"

"openssl: command not found" (with encryption enabled)

Permission denied errors

Encrypted archives not decrypting

License

MIT License - see LICENSE file for details.

Credits

Created by vocweb. Inspired by the need to manage large production log archives efficiently.


All versions of laravel-log-compress with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/support Version ^10.0|^11.0|^12.0|^13.0
illuminate/console Version ^10.0|^11.0|^12.0|^13.0
illuminate/process Version ^10.0|^11.0|^12.0|^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package vocweb/laravel-log-compress contains the following files

Loading the files please wait ...