Download the PHP package processhub/laravel-logs without Composer

On this page you can find all versions of the php package processhub/laravel-logs. 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-logs

ProcessHub Logs — Laravel package

Ships logs, exceptions, and deploy markers from your Laravel application to ProcessHub's centralised observability module. Get grouped exceptions, deploy-marker annotations on your event graph, and a single requestId trail across every log line of a user request.

Status: MVP — production-ready for Laravel 10/11/12 on PHP 8.1+.

Install

Then, per the install output:

  1. Add credentials to .env:

    Get the token at ProcessHub → Приложения → <your app> → Интеграция → Выпустить токен. Copy immediately — it won't be shown again.

  2. Register the logging channel in config/logging.php:

  3. Verify end-to-end:

    You should see a synthetic ERROR appear in the ProcessHub application detail page within a second.

That's it. Every Log::error/warning/info (above the channel's level) is buffered in memory and shipped to ProcessHub in batches of up to 100 entries via the queue.

What it does

Configuration

See config/processhub.php after publishing. Highlights:

Env Default What
PROCESSHUB_LOG_URL — Base URL of your ProcessHub tenant
PROCESSHUB_LOG_TOKEN — ph_live_<orgSlug>_<appSlug>_<rand>
PROCESSHUB_LOG_QUEUE logs Queue name for SendLogBatchJob
PROCESSHUB_LOG_CONNECTION default Queue connection (redis, database, etc.)
PROCESSHUB_LOG_BATCH_SIZE 100 Max entries per batch (capped at ProcessHub's hard limit of 100)
PROCESSHUB_LOG_BATCH_MAX_BYTES 1800000 Max JSON size of a batch (server limit is 2 MB)
PROCESSHUB_LOG_FLUSH_INTERVAL_SEC 10 Max age of a partial batch in a long-lived process (queue worker) before it is queued
PROCESSHUB_LOG_TIMEOUT_MS 5000 HTTP timeout (rounded up to whole seconds)
PROCESSHUB_LOG_RETRY_WINDOW_SEC 3600 How long SendLogBatchJob keeps retrying (min 60) before the batch goes to the fallback file. The job checks the deadline itself — also when a backlog delays it past the deadline; the worker's retryUntil is the deadline + 24 h, so nothing lands in failed_jobs by time
PROCESSHUB_RATE_LIMIT_PER_MINUTE 50 Shared limit of ingest POSTs per minute across all workers and flush-fallback (ProcessHub allows 60/min per token): one request per 60/limit s with a burst of ⌈limit/10⌉ — any 60 s window gets at most limit + burst (50 → 55). 0 disables the limiter
PROCESSHUB_RATE_LIMIT_STORE cache.default Cache store holding the limiter state (one key, changed under Cache::lock). Must support atomic locks and be shared by all processes: redis, memcached, dynamodb, database (with the cache_locks table); file only on a single host; array is per-process. A store without locks or an unavailable one makes the limiter step aside (a warning once per process)
PROCESSHUB_HEARTBEAT_ENABLED true Disable if your env doesn't run the scheduler
PROCESSHUB_LOG_SLOW_QUERIES false Emit slow queries as logs
PROCESSHUB_SLOW_QUERY_MS 1000 Threshold when slow-query logging is on

Without env variables:

Remote config from ProcessHub (pulled by the heartbeat into storage/app/processhub-config.json, read at boot — long-running workers need horizon:terminate / queue:restart to see a change) overrides some of these:

Commands

Command What
processhub:install Publish config + print manual-step checklist
processhub:test Direct POST (no queue) to verify credentials / network
processhub:heartbeat Single heartbeat ping; auto-scheduled every minute
processhub:flush-fallback [--limit=N] [--max-wait=120] [--rate=N] [--max-runtime=300] Re-ingest batches saved to storage/logs/processhub-fallback.log during outages
processhub:rebatch-queue --from=<queue> [--chunk=1000] [--limit=N] [--rate=N] [--start-delay=S] [--max-ahead=M] Repack a Redis backlog of single-entry SendLogBatchJobs into full batches on processhub.queue
processhub:forget-failed [--dry-run] [--to-fallback] Delete failed-job records of SendLogBatchJob only (failed_jobs and Horizon)

processhub:flush-fallback

The package doesn't schedule it. Recommended:

processhub:rebatch-queue

A recovery tool for backlogs left by versions < 0.4 (one job per log record); see Recovering from a pre-0.4 backlog. Works on a Redis queue connection only; --from must differ from processhub.queue.

processhub:forget-failed

Deletes failed-job records of SendLogBatchJob only — never other jobs' (matched by the payload's job class, not by a mention in its data): from the queue.failed storage (database drivers scanned in id chunks of 1000, other drivers via FailedJobProviderInterface) and, when Horizon is installed, from its failed list. --dry-run only counts. --to-fallback first appends each record's entries to the fallback file (once per job uuid — failed_jobs and Horizon hold the same failure); records it can't read are kept, and a write failure (including fallback_path = null) stops the run, keeping every record not written out. Don't use queue:flush / queue:prune-failed / horizon:clear for this — they hit other jobs' records too.

Recovering from a pre-0.4 backlog

Versions < 0.4 queued one job per log record; a stuck ingest could leave millions of them in the logs queue plus a pile of failed SendLogBatchJobs. <prefix> below is your database.redis.options.prefix.

  1. Deploy 0.4 and restart the workers (horizon:terminate / queue:restart). Leave flush-fallback out of the schedule for now — it shares the rate limit with the backlog.
  2. Move the backlog aside — atomically, workers keep running:

    RENAMENX never overwrites a backlog left by a previous attempt — if it returns 0, pick another name (e.g. logs-backlog-2). Delayed/reserved jobs stay in logs; workers send each one if the limiter has a free slot and park it in the fallback file otherwise (step 4 delivers it).

  3. Repack it with a rolling window, repeating until the backlog is empty (LLEN <prefix>queues:logs-backlog and …:rebatching are 0):

    Watch that queues:logs doesn't grow and no "moved to the fallback file" warnings appear; lower --rate otherwise.

  4. Flush the fallback file once the repacked batches are delivered (queues:logs:delayed is about empty):

    Ctrl-C stops cleanly; the next run resumes from the checkpoint. Then add the scheduled flush.

  5. Clean up failed-job records (0.3 jobs that had already used up their 3 attempts are failed by the worker before they run — their batch goes to the fallback file and a record stays in failed_jobs/Horizon): php artisan processhub:forget-failed --dry-run to count, then php artisan processhub:forget-failed — or with --to-fallback if some of those batches never made it into the fallback file (already delivered entries are then sent again), followed by another flush-fallback. Horizon also expires them by itself after horizon.trim.failed.

How it fails

Retries are limited only by time: a batch has PROCESSHUB_LOG_RETRY_WINDOW_SEC (1 h) from the moment it becomes due (SendLogBatchJob::enqueue($entries, $delaySeconds) shifts the deadline by the delay). There is no attempt or exception cap.

Testing

Tests use Orchestra Testbench: Redactor, CorrelateRequestId, FallbackFile, batching/flush hooks (including fatal errors and forked children), exception capture, SendLogBatchJob HTTP branches (Http::fake), IngestThrottle, HandleJobFailed, processhub:flush-fallback, processhub:forget-failed. Tests with pcntl_fork() need the pcntl/posix extensions. Worker delivery-loop, Redis delivery and processhub:rebatch-queue tests (and the Redis variant of the limiter test) need Redis and run only when PROCESSHUB_TEST_REDIS_HOST is set (port PROCESSHUB_TEST_REDIS_PORT, 6379 by default; they FLUSH DB PROCESSHUB_TEST_REDIS_DB, 15 by default):

Static analysis needs more than the default memory:

Contract with ProcessHub

This package targets the ingest contract documented in ProcessHub docs — Applications module. Key limits (as of 2026-04):

If ProcessHub changes the contract, bump the package's minor version so apps can upgrade in lock-step.

License

MIT — see LICENSE.


All versions of laravel-logs with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
laravel/framework Version ^10.0|^11.0|^12.0
monolog/monolog Version ^3.0
guzzlehttp/guzzle Version ^7.5
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 processhub/laravel-logs contains the following files

Loading the files please wait ...