Download the PHP package los/loslog without Composer

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

LosLog

Build Status Latest Stable Version Total Downloads Coverage Status Scrutinizer Code Quality SensioLabs Insight Dependency Status

Introduction

This is the 2.0 documentation version. Please refer to the README-1.0 for 1.0 documentation.

This module provides some useful log classes:

Requirements

Instalation

For composer documentation, please refer to getcomposer.org.

Usage

Copy the file loslog.global.php.dist to your config/autoload/ , rename it to loslog.global.php and change the default options, if needed.

LosLog Middleware

Zend Expressive

Expressive 2.0 introduced a new method to handle errors, using listeners to the ErrorHandler and delegator factories, so this is the preferable method.

Add the delegator factory to the ErrorHandler, like:

General use

If using other framework, you can add the LosLogFactory to your factory system, manually create a LosLog instance or call the LosLogFactory directly.

HttpLog Middleware

It will log requests and responses in compact or full mode. It will include X-Request-Id and X-Response-Time headers if present.

Zend Expressive

Add the middleware as the first middleware in your pipeline, like:

Set the desired options in loslog.global.php (or loslog.local.php):

You can integrate with los/request-id and los/response-time. The order is important, use as bellow:

This will produce:

ErrorLogger

To enable the ErrorLogger just add the registerHandlers inside your public/index.php

Zend Framework 2

Zend Expressive

You can use the logger with your phpunit tests. Just call it in your bootstrap file just after the autoload is created:

Output example

The default logfile is data/log/error.log

ExceptionLogger

To enable the ExceptionLogger just add the registerHandlers inside your public/index.php

Zend Framework 2

Zend Expressive

Output example

The default logfile is data/log/exception.log

StaticLogger

This logger is usually used to log development or debug messages, arrays and objects. Just call it statically anywhere in your code.

will generate

Or an object:

will generate

The default logfile is data/log/static.log

Z-Ray

Z-Ray is an awesome resource from Zend Server that provides several information about the request, errors and the framework. It also has the possibility to add your own informations, so i added the StaticLogger messages to it.

More information can be seen here.

Installation

The LosLog module is available via the Official Z-Ray plugin system, just access the tab from your Zend Server UI and install it.

Usage

Just use the StaticLogger and the messages will appear inside a LosLog section of the Z-Ray bar.

Optionally, you can pass a "null" value to the file argument to use just the Z-Ray, without writing the message to a file:


All versions of loslog with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1
psr/log Version ^1.0
laminas/laminas-stratigility Version ^3.0
laminas/laminas-diactoros Version ^1.7 || ^2.0
laminas/laminas-log Version ^2.9
psr/container 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 los/loslog contains the following files

Loading the files please wait ....