Download the PHP package dremecker/bfw-advanced-log without Composer

On this page you can find all versions of the php package dremecker/bfw-advanced-log. 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 bfw-advanced-log

BFW Logger

Advanced log module for BFW framework

BFW Logger manage your log records by sending its into log files and allow you to rotate, compress and flush your logs (all fully configurable). This module implements the PSR-3 interface and default classes, so you can use PSR-3 log levels and PSR-3 logger interface methods.

Before installing

You must have installed BFW framework before using this log module. You can find more information about BFW here : https://github.com/bulton-fr/bfw


Installation

We recommand using composer for installing "BFW Logger". You can get composer by executing this command line :

Create (or open) the "composer.json" file at the root of your project and add :

Then launch module installation by executing:

And launch BFW module loading :

Configuring BFW Logger

After a successfull install, you will find in "/configs/bfw-advanced-log" two files that will help you to configure BFW Logger.

This files are commented and full of multiple examples, so we will not go further for the moment.


Using BFW Logger

The logger instance is initialised for each page request. You can access it with:

Before sending message to the logger, you must set a channel. For doing so:

Because BFW Logger implements PSR-3 standarts, you can call PSR-3 logger interface methods just like this:

PSR-3 log() method is also available (see PSR-3 standarts for more informations):

You can also call BFW Logger archiveLogFiles() method for processing log files archiving. We recommend you to call this method into a crontab php script for avoiding latency due to compression (if you have enabled it), and huge file rotation. This method purpose is to offer you a way to replace logrotate, in a very light and simple form, if you cannot access it on your actual hosting service.

As you may have notice, you always have to set channel before using it. It's a bit different with archiveLogFiles() method. If you have not preset channels in configuration file, you will have to set ALL CHANNELS USED IN YOUR PROJECT that you want to archive before calling archiveLogFiles() method just like this:

If all your channels have been setup into configuration file, you can just call archiveLogFiles() method without anything else:


All versions of bfw-advanced-log with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
bulton-fr/bfw Version ~2.2
psr/log Version dev-master
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 dremecker/bfw-advanced-log contains the following files

Loading the files please wait ....