Monolog
PHP-DI
Monolog | PHP-DI | |
---|---|---|
31 | 13 | |
20,806 | 2,628 | |
- | 0.2% | |
8.2 | 6.3 | |
2 days ago | 8 days ago | |
PHP | PHP | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Monolog
-
I don't understand error_log
To add onto this, what's more commonly done these days is to use a library like Monolog which can be configured with multiple log handlers. One of the handlers which are typically enabled is one which writes to error_log. You can add more which write directly to a logging service like Sentry or whatever, or even in dev write an HTTP header paired with a browser extension which puts your backend log messages in your browser console (see the handler + install the extension for chrome or firefox)
-
Open Source Projects You Can Lay Your Hand On
Monolog is a highly regarded PHP logging library with open source code. This project extends a straightforward and adaptable API, allowing developers to log messages from their PHP applications to diverse channels, including files, databases, and various third-party services. The modularity of this project’s source code provides an assortment of handlers and processors that seamlessly combine and configure to cater to specific logging requirements for any application.
- Designing with PHP 8.1 Enumerations
-
Will console logs ever be added to PHP?
If you need something more flexible you could always use Monolog which provides a bunch of adapters to log to any service want. You could for example use the syslog adapter to send your logs to syslog, and then configure rsyslog to print them directly into your terminal (or just `tail -f` a log file).
-
Logging in your API
PHP -> Built in Logger, Monolog, Analog, KLogger, Log4PHP
-
Logging Errors in PHP
So far, I've been discussing what PHP itself has to offer, which, quite frankly, is not very appealing. Luckily, though, there are great developers involved in pushing beyond those boundaries, making the appearance of great tools a reality. That is the case for Monolog.
-
Laravel logging: Show correct severity levels on the Google Cloud Platform
Laravel (and many other frameworks) use the Monolog Package for logging by default. Using their formatter does everything you need!
-
Create simple function to debug in live code?
Nowadays all popular frameworks comes with logging system built in. If not, you should use http://seldaek.github.io/monolog/.
- Slim, possívelmente o framework ideal para quem vem do Golang
-
How to send application logs to Telegram in Laravel.
Laravel logging is created on top of Monolog, which is a powerful logging library for PHP projects. In this guide, we will be looking at how to send our laravel logs to telegram channel with the help of the Telegram Bot API.
PHP-DI
-
Reusing PHP code (with GIFs)
You may read PHP-DI to dig further.
-
In your opinion, which existing PHP framework can become as popular as Symphony or Laravel?
This one is compliant with PSR-11 and super easy to use: https://php-di.org/
- Slim, possívelmente o framework ideal para quem vem do Golang
-
7 WordPress Best Practices For Real Engineers
PHP-DI
-
Build a Speech-to-Text Web Application with Rev AI and PHP (Part 1)
PHP-DI: a PHP dependency injection container
-
Running non-blocking A/B tests, feature flags with Laravel, PHP
Please, visit the repository for configuration instructions. The package wouldn't work without DI. So, if you're not using DI yet, try PHP-DI.
-
What PHP book would you most like to see written?
With a real DI system https://github.com/PHP-DI/PHP-DI
-
Searching alternative to Singleton and Dependecy Injection
Your service locator can cache the generated objects or create them on demand every time. How that is handled is up to your DI/SL library. For example, PHP\DI will cache a created object and pass the same instance to everything unless you tell it otherwise.
-
When Symfony Http Kernel is a Too Big Hammer to Use
What about using php-di?
- How to properly write a database class in php with singleton pattern?
What are some alternatives?
Analog - PHP logging library that is highly extendable and simple to use.
Pimple - A small PHP dependency injection container
Grafana - The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
Symfony DI - Allows you to standardize and centralize the way objects are constructed in your application
CWH (CloudWatch Handler) - Amazon Web Services CloudWatch Logs Handler for Monolog library
Container - Small but powerful dependency injection container
KLogger - A Simple Logging Class For PHP
Auryn - IoC Dependency Injector
RadPHP Logging Component - [READ-ONLY] Logging component. This repo is a split of the main code that can be found in https://github.com/radphp/radphp
Nette DI - 💎 Flexible, compiled and full-featured Dependency Injection Container with perfectly usable autowiring and support for all new PHP 7 features.
ErrorDumper
bref - Serverless PHP on AWS Lambda