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

Logger Laravel Package

zhamao/logger

zhamao/logger is a lightweight logging library for PHP applications, offering configurable log levels, file and console output, and simple integration with Zhamao-based projects. Use it to write, format, and manage application logs with minimal setup.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. Unchanged by 1.1.9. zhamao/logger is still not a Laravel package in any meaningful sense — no service provider, no facade, no configuration file, no config/logging.php channel driver. It is a standalone console logger aimed at long-running CLI/Swoole-style daemons, produced by the Zhamao robot framework ecosystem. Laravel's logging stack is Monolog 3 behind a PSR-3 LoggerInterface, fanned out through channels, handlers, and formatters. This package sits beside that stack rather than inside it. Any fit remains narrow: artisan commands, queue workers, scheduled tasks, and custom daemons — not the HTTP request path.

Integration feasibility. Unchanged. Two paths remain: (a) a thin Monolog handler delegating write() to the package's logger, or (b) a PSR-3 adapter so it can be registered as a custom channel. Both are a few dozen lines of glue that we own and must maintain forever. 1.1.9 does not add a PSR-3 implementation, a formatter abstraction, or a framework bridge, so the adapter is still mandatory rather than optional.

Technical risk. Still high, and still driven by project health rather than code quality. One star, zero dependents, single-maintainer upstream. No integration tests against Laravel versions, no PHP support matrix, no security review surface — and logging libraries routinely handle secrets, tokens, and PII. The 1.1.9 patch is a positive but marginal signal: it is a hardening fix (removing @ error suppression from echo/fwrite/fflush), authored by the same maintainer handle associated with the Zhamao ecosystem, so the bus factor does not improve. It does, however, confirm several things the prior assessment could only guess at: the logger writes directly to stdout via echo/fwrite/fflush, meaning synchronous, blocking, unbuffered-by-default output with no plugagble writer or stream abstraction. That answers part of the earlier question set — and it answers it unfavorably.

Key questions. Partially answered by 1.1.9: output is synchronous fwrite/fflush to stdout, not buffered or async. Still open: Does it implement Psr\Log\LoggerInterface? What are the PHP and extension requirements (ext-swoole, ext-posix, ext-pcntl)? Does it handle non-TTY environments, CI pipelines, and SIGPIPE/broken pipes gracefully — and, post-1.1.9, does the newly un-suppressed fwrite warning path get converted into an ErrorException by Laravel's error handler and hard-fail a worker? Does it support structured (JSON) output alongside human-readable console output? Is it coroutine-safe under Swoole, and does it leak memory across long-running workers? Is the documentation English or Chinese-only?

Integration Approach

Stack fit. Poor for the web tier, acceptable for the CLI tier — unchanged. Laravel's Log facade already gives us context-aware, channel-routed, PSR-3-compliant logging with daily/stderr/syslog/stack drivers and mature formatters. A console logger is a presentation concern, and Monolog already supports this via a custom FormatterInterface. 1.1.9 adds no capability we cannot replicate; it removes error suppression, which is a correctness fix, not a feature.

Migration path. Recommend a spike, not adoption. (1) Branch-local PoC wrapping the package behind a Monolog handler; (2) compare output quality against a hand-written LineFormatter subclass; (3) if parity is reached — which I expect — close the spike and ship the formatter. If the package offers something genuinely hard to replicate (e.g., Swoole-aware async terminal rendering), revisit with a vendored fork under our control. Note that 1.1.9 is a patch-level bump with no API change, so any PoC work done against 1.1.8 carries forward without modification.

Compatibility. Still unknown and unverifiable from the metadata. Before any code is written, confirm the composer.json PHP constraint against our runtime (8.2/8.3), check for hard extension requirements that would break our containers, and confirm it does not pin Monolog or psr/log to a version that conflicts with framework constraints. 1.1.9 does not touch constraints, so the transitive-conflict risk is unchanged — and the blast radius of a composer update failure across the whole application remains disproportionate for a formatting utility.

Sequencing. Unchanged: Discovery (read source, confirm PSR-3 and extension surface) → PoC in isolation → formatter comparison → decision gate. Do not sequence this ahead of any framework upgrade. If adopted at all, roll out strictly to artisan commands and queue workers first, keep the default stack channel untouched, and hold production HTTP logging on stock Monolog indefinitely. 1.1.9 changes the behavior of write failures, so any PoC must explicitly test broken-pipe and closed-stdout scenarios rather than assuming the 1.1.8 behavior.

Operational Impact

Maintenance. The dominant cost, and unchanged by a patch release. One star and zero dependents mean we are the de facto maintainers from day one: no upstream triage at scale, no security advisories, no compatibility patches when Laravel or PHP bumps. The 1.1.9 fix is the kind of low-level hygiene issue we would ordinarily expect to be caught by tests; its presence here suggests the write path is not covered by CI, which is itself a maintenance signal.

Support. None. No community, no issue-tracker velocity, no Stack Overflow corpus, documentation likely Chinese-only. Internal onboarding must rely on reading the source directly.

Scaling. Unchanged and now better characterized. The 1.1.9 diff confirms per-record fwrite + fflush to stdout: every log line is a blocking syscall with an explicit flush, no buffering layer. On a high-volume queue worker that is a measurable latency contributor — worse than the prior assessment assumed, since fflush per record defeats libc buffering. Scaling is per-process and CPU-cheap, so capacity is not the concern; syscall throughput as a fraction of job time is.

Failure modes. This is where 1.1.9 materially changes the picture. Removing @ from echo/fwrite/fflush means write failures — broken pipe, closed stdout, full disk, containerized/CI runner teardown — now surface as PHP warnings instead of being silently swallowed. Two consequences: (a) improved debuggability, since failures are no longer invisible; (b) increased blast radius, because Laravel's error handler converts warnings to ErrorException by default, so a broken stdout can escalate from "lost log lines" to "worker throws mid-job" — a reliability regression relative to 1.1.8 unless the caller installs a handler or suppresses per-call. This must be tested explicitly before any rollout. Other failure modes persist: ANSI escape sequences leaking into non-TTY sinks and corrupting aggregator parsing; no structured output, blocking ingestion into Elasticsearch/Loki/Datadog without a second formatter; unescaped user-controlled strings enabling terminal escape injection; and loss of the buffered tail on crash — though with per-record fflush, that last risk is smaller than previously assumed.

Ramp-up. Superficially low — a console logger's API surface is small — but the real ramp-up is organizational: convincing reviewers that a one-star, single-maintainer dependency is justified for output formatting. 1.1.9 does not help that argument; if anything, the fact that a patch was needed to stop suppressing I/O errors is a concrete example of the review burden we would be absorbing. Recommend the team spend the same half-day writing a Monolog formatter and keep the dependency count flat. Verdict unchanged: do not adopt.

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.
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package