Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Pecs Laravel Package

hamidrezaniazi/pecs

PECS is a Laravel/PHP package that makes PHP enums easier to work with by adding collection-style helpers. Build typed enum collections from cases, then filter, map, sort, and chain operations with a familiar fluent API for cleaner, type-safe code.

View on GitHub
Deep Wiki
Context7

PECS simplifies logging in PHP with the power of Elastic Common Schema.

Frequently asked questions about Pecs
What is PECS for Laravel?
PECS is described as a Laravel/PHP logging package that simplifies PHP logging with Elastic Common Schema, typically as ECS-aligned JSON for Elasticsearch or Kibana. The technical assessment treats it as a Monolog formatter or logging channel, not a full log collector, pipeline, or telemetry platform. Verify the current README and composer metadata before committing because package scope and documentation can drift.
How do I install and configure PECS in Laravel?
Install it with Composer using hamidrezaniazi/pecs, then wire it into Laravel's logging stack as a custom Monolog channel or formatter in config/logging.php. Keep your existing local or stderr channel and test the JSON output and context fields before routing production traffic. Pin the package version and confirm PHP, Laravel, and Monolog compatibility in the package metadata.
Does PECS support Laravel 11, Laravel 12, and Monolog 3?
The assessment flags Laravel 11-12 and Monolog 3 support as key questions rather than confirmed facts. Check the package composer.json, README, release notes, and test matrix for the exact PHP, Laravel, and Monolog versions. If your matrix is unsupported, plan to wrap or fork the formatter or choose another logging channel.
Which Elastic Common Schema version does PECS emit?
The provided assessment does not confirm a specific ECS version, so treat ECS version drift as a validation item. Compare emitted field names against your Elasticsearch index templates, mappings, Kibana queries, and alerts. Pin the package version and document the ECS schema your dashboards depend on.
Can PECS capture request IDs, user IDs, tenant IDs, and exception chains?
Those enrichment fields are listed as key questions, not guaranteed features. Confirm whether PECS adds request, user, tenant, HTTP, queue or job, and exception context or whether you need Monolog processors and Laravel middleware. Validate multiline exceptions and large payload behavior before production.
Can I use PECS with Elasticsearch, Kibana, or OpenSearch?
PECS is aimed at ECS-aligned JSON that can be shipped to Elasticsearch or Kibana-compatible ingestion, and OpenSearch may work if mappings and field names align. Validate index templates, mappings, and dashboards in a staging environment. The package is not positioned as an Elasticsearch client or full ingestion pipeline.
Is PECS only a formatter, or does it manage Elasticsearch indices and ILM?
The technical assessment assumes PECS is a Laravel and Monolog logging formatter or channel, not a complete logging pipeline. Elasticsearch index templates, mappings, ILM policies, retention, and rollover remain your responsibility. Confirm in the README whether any index lifecycle behavior exists before relying on it.
How should I test PECS before production?
Start with one non-critical Laravel service, inventory current log fields and Kibana queries, pin the package version, and dual-write to legacy and ECS destinations in staging. Compare field coverage, mapping behavior, exception logs, and request context, then canary a small production slice. Keep the existing channel as a fallback until dashboards and alerts are validated.
Does PECS redact PII or support sampling, async handlers, and failure fallback?
The assessment flags redaction, sampling, async handlers, and non-blocking failure modes as open questions, so do not assume they are built in. Add Monolog processors or middleware for redaction and context enrichment, and use a non-blocking handler or fallback channel where log loss is unacceptable. Test formatter exceptions and large payloads explicitly.
Is PECS production-ready and actively maintained, and what are the alternatives?
The package has limited adoption signals, including about 32 stars, a 0.25 score, and maintainer concentration, so long-term support is uncertain despite a February 2025 release. MIT licensing lets you fork or vendor the formatter, and a small pilot is cheap and reversible. Alternatives include a custom Monolog ECS formatter, established ECS logging libraries, or your existing Laravel logging channels with added processors.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo