Download the PHP package itafroma/snaglogger without Composer

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

Snaglogger

Snaglogger is a PSR-3-compatible logger that sends log messages to Bugsnag.

Installation

Snaglogger can be added to your project via Composer:

Snaglogger uses semantic versioning. In general, you can pin to ^[MAJOR].0 and be confident you will not receive breaking changes during updates.

Usage

Quickstart

Snaglogger comes with a factory that instantiates the logger with sensible defaults:

Once instantiated, the logger will work as any other PSR-3-compatiable logger:

The PSR-3 context array

Snaglogger will send the contents of the $context array to Bugsnag as metadata.

Additionally, Snaglogger treats two $context keys as special:

Finally, Snaglogger will use the $context array for placeholder replacement within the log message:

Severity levels

Bugsnag only supports three severity levels: info, warning, and error. However, PSR-3 requires loggers to support eight: emergency, alert, critical, error, warning, notice, info, and debug. By default, Snaglogger maps these additional log levels to the closest Bugsnag severity level:

Advanced usage

Some functionality can be customized by implementing certain interfaces:

More information can be found in those interfaces' inline documentation.

You may also want to customize the Bugsnag client.

To override Snaglogger's default functionality, you will need to:

  1. Implement your own concrete class of \Itafroma\Snaglogger\LoggerFactoryInterface, and/or
  2. Call the Logger constructor directly.

For example:

Contributing

Contributions are welcome! Please see the separate CONTRIBUTING file for more information.

Copyright and license

This extension is copyright Mark Trapp. All Rights Reserved. It is made available under the terms of the MIT license. A copy of the license can be found in the LICENSE file.

Disclaimer

This project has no affliation with Bugsnag in any way. Additional disclaimers can be found in the LICENSE file.


All versions of snaglogger with dependencies

PHP Build Version
Package Version
Requires php Version ~5.6 || ~7.0
bugsnag/bugsnag Version ^3.4
psr/log Version ^1.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 itafroma/snaglogger contains the following files

Loading the files please wait ....