Download the PHP package acplo/acplolog without Composer

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

AcploLog

Latest Stable Version Total Downloads Latest Unstable Version License

Introduction

This module provides some useful log classes:

Requirements

This module only requires zendframework 2 framework.zend.com.

Instalation

Instalation can be done with composer ou manually

Installation with composer

For composer documentation, please refer to getcomposer.org.

  1. Enter your project directory
  2. Create or edit your composer.json file with following contents:

  3. Run php composer.phar install
  4. Open my/project/directory/config/application.config.php and add AcploLog to your modules

    Usually insert as the first module to enable catch errors and exceptions in all modules.

Installation without composer

  1. Clone this module AcploLog to your vendor directory
  2. Enable it in your config/application.config.php like the step 4 in the previous section.

Usage

To change the options, copy the file acplolog.global.php.dist to your config/autoload/ , rename it to acplolog.global.php and change the default options.

ErrorLogger

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

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

Output examples

PHP Error
Exception

The default logfile is data/log/error.log

EntityLogger

The first usage is to dump a Doctrine Entity to the screen, either HTML or console.

To do that just call a static function:

and it will print:

The "dump" function provides two more arguments:

The second argument indicates how depth will be the dump (other classes as properties, including collections) with default to 1 and the third if the output will be HTML friendly (encloses the output in a "pre" tag) or false for a console version with a default to true.

and it will print:

and it will print:

The second usage of this class is to save database operations generated by your entities.

ATTENTION: This logger depends on DoctrineORMModule. Since its usage is optional, i did not put this requirement inside the composer.json

To enable this logger, register inside your doctrine's config (e.g. config/autoload/global.php)

will generate:

The default logfile is data/log/entity.log

SqlLogger

With this logger you can save all Doctrine database operations within your application.

ATTENTION: This logger depends on DoctrineModule. Since its usage is optional, i did not put this requirement inside the composer.json

Edit the config/autoload/acplolog.global.php file to enable this logger.

The default logfile is data/log/sql.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

Optionally, you can get it through Service Locator

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.

Warning: The Z-Ray extensions works only on Zend Server 8 or greater.

Installation

To use the StaticLogger with Z-Ray, follow these steps:

1- Locate the zray extension directory inside the zend server.

For example on Mac/Linux can be found on: /usr/local/zend/var/zray/extesions

2- Create a directory called AcploLog

3- Copy the zray.php and logo.png to this directory

The final result should be:

Usage

Just use the StatticLogger and the messages will appear inside a AcploLog 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 acplolog with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
zendframework/zendframework Version >=2.3.2,<3.0.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 acplo/acplolog contains the following files

Loading the files please wait ....