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 Core

Logger Core Laravel Package

graham-campbell/logger-core

Core logging utilities for Laravel applications, providing a PSR-3-compatible logger foundation, context handling, and reusable components for Graham Campbell's logger packages. Lightweight and easy to integrate into existing Laravel projects.

View on GitHub
Deep Wiki
Context7

graham-campbell/logger-core provides a lightweight, PSR-3 compatible logging foundation for PHP and Laravel applications. It centralizes core logging behavior so related packages can share consistent log handling, levels, and context without duplicating implementation.

  • PSR-3 logger interface with standard log-level methods.
  • Context-aware records for structured, interpolated messages.
  • Configurable levels and sensible defaults for filtering output.
  • Laravel-friendly integration with the framework’s logging stack.
  • Extensible design for custom handlers and package reuse.
Frequently asked questions about Logger Core
What is graham-campbell/logger-core used for?
It provides core logging utilities for Laravel, specifically the logger service provider and a factory for building PSR-3 loggers with custom handlers and processors. It also ships a logger trait for reuse in your own classes. The code was extracted from the Laravel Logger package so the same utilities can be consumed standalone as a smaller dependency.
How do I install graham-campbell/logger-core with Composer?
Install it with composer require graham-campbell/logger-core. The package assumes standard Composer autoloading, so no build-system changes are needed. In a full Laravel application the service provider is expected to be discovered automatically; in Lumen you must register it manually.
Does logger-core support Lumen?
Yes. Version 1.1.0 added official Lumen support, which means the package can run outside a full Laravel application kernel in thin API services or workers. Lumen does not auto-discover packages, so you must register the service provider yourself in bootstrap/app.php. The release notes do not state which Lumen versions are covered, so confirm compatibility for your target version first.
Which Laravel and PHP versions does logger-core support?
The reviewed material does not state an explicit minimum PHP, Laravel, or Lumen version, so check the composer.json constraints before installing. The 1.1.0 release is a minor bump with no breaking changes signalled. Run a short spike against your exact framework version rather than assuming a support window.
How do I register logger-core in a Lumen application?
Because Lumen has no package auto-discovery, you add an explicit $app->register(...) call for the package's service provider in bootstrap/app.php. That manual step also means there may be no automatic config merge or publish tags. Verify the exact provider class and any config-publishing path against the repository README before wiring it in.
What is the logger trait in logger-core and how do I use it?
The package provides a logger trait for reuse, letting you drop shared logging behaviour into your own classes instead of duplicating wiring. It is designed to pair with the logger factory, which builds PSR-3 loggers with custom handlers and processors. Include the trait in your class and resolve the logger through the factory or container.
Can I add custom handlers and processors to the logger?
Yes. The package is described as providing a logger factory for building PSR-3 loggers with custom handlers and processors, so you can compose your own logging stack rather than accept a fixed one. This is useful when you need specific Monolog handlers for files, streams, or external services. Check the source for the exact factory method signatures and how configuration is passed in.
How does logger-core relate to the full graham-campbell/logger package?
logger-core is the extracted core of the Laravel Logger package, containing the service provider, the logger factory, and the reusable logger trait. It is not presented as a drop-in replacement for the full package's broader feature set. If you only need PSR-3 logger construction with custom handlers and processors, the core package keeps the dependency footprint smaller.
Is logger-core production ready and well tested?
The 1.1.0 release notes mention only that a couple of tests were added, which suggests test coverage is still early. There is no stated information about CI configuration, matrix coverage across framework versions, static analysis, or whether the Laravel and Lumen paths are both exercised. Treat it as plausible but unverified: run a short integration spike plus your own test suite before relying on it in production.
Is upgrading to logger-core 1.1.0 safe, and are there breaking changes?
Version 1.1.0 is a minor bump for additive Lumen support, with no deprecations or breaking changes signalled, so semver hygiene looks correct. A routine upgrade is a constraint bump, then run your suite and confirm the service-provider registration shape has not changed. If you are Laravel-only, this release is close to a no-op and can be handled as a low-priority version bump.
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