Download the PHP package camspiers/silverstripe-loggerbridge without Composer

On this page you can find all versions of the php package camspiers/silverstripe-loggerbridge. 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 silverstripe-loggerbridge

SilverStripe Logger Bridge

Build Status Latest Stable Version Code Coverage

Provides easy usage of PSR-3 loggers (like monolog) in SilverStripe 3.x. In SilverStripe 4.x and newer, PSR-3 support is built into the core system and this module is no longer required.

Installation (composer required)

$ composer require camspiers/silverstripe-loggerbridge:dev-master

Usage

  1. Create a config file in your mysite, e.g. "mysite/_config/logging.yml"
  2. Set up a PSR-3 logger service and add to the LoggerBridge constructor

    Injector:
        Monolog:
            class: Monolog\Logger
            constructor:
                0: App
                1:
                    - '%$StreamHandler'
        StreamHandler:
            class: Monolog\Handler\StreamHandler
            constructor:
                0: '../../error.log'
        LoggerBridge:
            class: Camspiers\LoggerBridge\LoggerBridge
            constructor:
                0: '%$Monolog'

Changing the way errors display in development

By default Logger Bridge uses Whoops for the display of errors and exceptions. You can change to using SilverStripe error display by adding the following to your yml:

Injector:
    LoggerBridge:
        properties:
            ErrorReporter: '%$LoggerBridgeDebugErrorReporter'

Advanced-style setup

This setup provides the following:

Attaching the logger as early as possible

SilverStripe currently doesn't provide any way to replace the default Debug error handlers prior to the database connection etc. But the following patch will use the Logger Bridge as early as possible.

To apply the patch, run the following from the framework directory of a 3.1.x-dev install.

patch -p1 < framework.patch

framework.patch

Unit testing

Logger Bridge has good unit test converage. To run the unit tests:

$ composer install --dev --prefer-dist
$ phpunit

License

SilverStripe Logger Bridge is released under the MIT license


All versions of silverstripe-loggerbridge with dependencies

PHP Build Version
Package Version
Requires composer/installers Version ~1.0
monolog/monolog Version ^1.7
filp/whoops Version ^2.0
silverstripe/framework Version ^3.1
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 camspiers/silverstripe-loggerbridge contains the following files

Loading the files please wait ....