Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on May 16, 2024 via composer

symfony/monolog-bundle v3.10.0

Symfony MonologBundle
Package summary
Share
0
issues
1
license
23
MIT
Package created
18 Nov 2011
Version published
6 Nov 2023
Maintainers
1
Total deps
23
Direct deps
5
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
23 Packages, Including:
monolog/monolog@3.6.0
psr/container@2.0.2
psr/event-dispatcher@1.0.0
psr/log@3.0.0
symfony/config@v7.0.7
symfony/dependency-injection@v7.0.7
symfony/deprecation-contracts@v3.5.0
symfony/error-handler@v7.0.7
symfony/event-dispatcher@v7.0.7
symfony/event-dispatcher-contracts@v3.5.0
symfony/filesystem@v7.0.7
symfony/http-foundation@v7.0.7
symfony/http-kernel@v7.0.7
symfony/monolog-bridge@v7.0.7
symfony/monolog-bundle@v3.10.0
symfony/polyfill-ctype@v1.29.0
symfony/polyfill-mbstring@v1.29.0
symfony/polyfill-php80@v1.29.0
symfony/polyfill-php83@v1.29.0
symfony/process@v7.0.7
symfony/service-contracts@v3.5.0
symfony/var-dumper@v7.0.7
symfony/var-exporter@v7.0.7
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

5
All Dependencies CSV
β“˜ This is a list of symfony/monolog-bundle 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
monolog/monolog3.6.0-MIT
prod
symfony/configv7.0.7-MIT
prod dev
symfony/dependency-injectionv7.0.7-MIT
prod dev
symfony/http-kernelv7.0.7-MIT
prod dev
symfony/monolog-bridgev7.0.7-MIT
prod

Visualizations

Frequently Asked Questions

What does symfony/monolog-bundle do?

The symfony/monolog-bundle is an integral package in Symfony that facilitates the utilization of the Monolog library. Monolog is a PHP-based logging library, and this bundle's function is to integrate it smoothly into the Symfony framework. That can significantly enhance your ability to log messages, errors, or even structured data, providing you with necessary insights and helping debug your application easily and effectively.

How do you use symfony/monolog-bundle?

To use the symfony/monolog-bundle in your project, you need to follow these steps.

  • First, install it using Composer by running:
composer require symfony/monolog-bundle
  • To configure the logging channels and handlers, use YAML-based configuration in your application's config file:
# config/packages/monolog.yaml
monolog:
    channels: ["my_channel"]
    handlers:
        my_handler:
            type:  stream
            path:  "%kernel.logs_dir%/my_channel.log"
            level: debug
            channels: ["my_channel"]

Please note that in this example, a new log channel named 'my_channel' is being generated. It is configured to use a handler 'my_handler' that logs the messages into a file my_channel.log and the log level specified is 'debug'.

  • After the configuration stage, the logger service can be injected into any services or controllers as per the need. Below is an example on how to use it in a controller:
<?php

namespace App\Controller;

use Psr\Log\LoggerInterface;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;

class DefaultController extends AbstractController
{
    public function index(LoggerInterface $myChannelLogger): Response
    {
        $myChannelLogger->info('I just logged in!');

        return $this->render('default/index.html.twig');
    }
}

Here, 'myChannelLogger' is our custom log channel injected into the 'index' action of 'DefaultController'. And we're logging an info message saying 'I just logged in!'.

Please keep in mind that these are basic usage examples. It's possible to utilize different channels, handlers, and log levels for a more complex setup.

Where are the symfony/monolog-bundle docs?

The primary source for the symfony/monolog-bundle's documentation is found on the official Symfony website. You can access detailed information about its usage, configuration, and features from Symfony Documentation. Additionally, for more information about Monolog itself and its capabilities, visiting the Monolog GitHub repository would be beneficial.