Download the PHP package systemsdk/easy-log-bundle without Composer

On this page you can find all versions of the php package systemsdk/easy-log-bundle. 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 easy-log-bundle

EasyLogBundle

Human-friendly log files for symfony framework. This is modified version of EasyCorp/easy-log-handler due to EasyCorp/easy-log-handler is abandoned and no longer maintained.

Actions Status

Source code

Description

Symfony log files are formatted in the same way for all environments. This means that dev.log is optimized for machines instead of humans. The result is a log file bloated with useless information that makes you less productive.

This bundle is a new Monolog handler that creates human-friendly log files. It's optimized to display the log information in a clear and concise way. Use it in the development environment to become a much more productive developer.

Requirements for EasyLogBundle version 2 or later

Requirements for EasyLogBundle version 1

Contents

  1. Features
  2. Installation
  3. Configuration and Usage

Features

These are some of the best features of EasyLogBundle and how it compares itself with the default Symfony logs.

Better Log Structure

Symfony log files are a huge stream of text. When you open them, you can't easily tell when a request started or finished and which log messages belong together:

Symfony EasyLogBundle
structure-overview-symfony-mini structure-overview-easylog-mini

EasyLogBundle structures the log files in a different way:

structure-easylog

Less Verbose Logs

First of all, EasyLogBundle doesn't display the timestamp in every log message. In the dev environment you shouldn't care about that, so the timestamp is only displayed once for each group of log messages.

Symfony EasyLogBundle
timestamps-symfony timestamps-easylog

The extra information, which some log messages include to add more details about the log, is displayed only when it's different from the previous log. In contrast, Symfony always displays the extra for all logs, generating a lot of duplicated information:

Symfony
extra-symfony
EasyLogBundle
extra-easylog

It's becoming increasingly popular to use placeholders in log messages instead of the actual values (e.g. Matched route "{route}". instead of Matched route "home".) This is great for machines, because they can group similar messages that only vary in the placeholder values.

However, for humans this "feature" is disturbing. That's why EasyLogBundle automatically replaces any placeholder included in the log message:

Symfony
placeholders-symfony
EasyLogBundle
placeholder-easylog

Better Visual Hierarchy

Important elements, such as deprecations and security-related messages, must stand out in log files to help you spot them instantly. However, in Symfony all logs look exactly the same. How can you know which are the important ones?

Symfony
visual-hierarchy-symfony
(all messages look exactly the same)
EasyLogBundle
visual-hierarchy-easylog
(deprecations, warnings, errors and security messages stand out)

Dynamic Variable Inlining

Log messages usually contain related variables in their context and extra properties. Displaying the content of these variables in the log files is always a tough balance between readability and conciseness.

EasyLogBundle decides how to inline these variables dynamically depending on each log message. For example, Doctrine query parameters are always inlined but request parameters are inlined for unimportant requests and nested for important requests:

dynamic-inline-easylog

Stack Traces

When log messages include error stack traces, you definitely want to take a look at them. However, Symfony displays stack traces inlined, making them impossible to inspect. EasyLogBundle displays them as proper stack traces:

Symfony
stack-trace-symfony
EasyLogBundle
stack-trace-easylog

Log Message Grouping

One of the most frustrating experiences when inspecting log files is having lots of repeated or similar consecutive messages. It leads to lack of information and it just distract you. EasyLogBundle process all log messages at once instead of one by one, so it's aware when there are similar consecutive logs.

For example, this is a Symfony log file displaying three consecutive missing translation messages:

translation-group-symfony

And this is how the same messages are displayed by EasyLogBundle:

translation-group-easylog

The difference is even more evident for "event notified" messages, which usually generate tens of consecutive messages:

Symfony
event-group-symfony
EasyLogBundle
event-group-easylog

Most log handlers treat each log message separately. In contrast, EasyLogBundle advanced log processing requires each log message to be aware of the other logs (for example to merge similar consecutive messages). This means that all the logs associated with the request must be captured and processed in batch.

Installation

  1. If you have installed easycorp/easy-log-handler just uninstall it:

Note: Please remove configuration files config/packages/easy_log_handler.yaml, config/packages/dev/easy_log_handler.yaml, config/packages/test/easy_log_handler.yaml, etc...

  1. Edit your config/packages/dev/monolog.yaml and config/packages/test/monolog.yaml and put next configuration:

In the above configuration, the buffered handler saves all log messages and then passes them to the EasyLog bundle, which processes all messages at once and writes the result in the log file. Use the buffered handler to configure the channels logged/excluded and the level of the messages being logged.

  1. Allow Flex to use contrib recipes and install next symfony bundle:

Configuration and Usage

You can change default configuration in your application by editing next config file:


All versions of easy-log-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
monolog/monolog Version ~3.0
symfony/yaml Version ^6.1|^7.0
symfony/framework-bundle Version ^6.1|^7.0
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 systemsdk/easy-log-bundle contains the following files

Loading the files please wait ....