Download the PHP package analog/analog without Composer

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

Analog - Minimal PHP logging library

GitHub Workflow Status GitHub Packagist Version Packagist PHP Version Support Packagist Downloads

A minimal PHP logging package based on the idea of using closures for configurability and extensibility. It functions as a static class, but you can completely control the writing of log messages through a closure function (aka anonymous functions), or use the Analog\Logger wrapper that implements the PSR-3 specification.

Installation

Install the latest version with:

Usage

Basic Usage

Usage with PSR-3

Usage with a custom handler

Usage without composer

Analog uses a simple autoloader internally, so if you don't have access to composer you can clone this repository and include it like this:

For more examples, see the examples folder.

Logging Options

By default, this class will write to a file named sys_get_temp_dir() . '/analog.txt' using the format "machine - date - level - message\n", making it usable with no customization necessary.

Analog also comes with dozens of pre-written handlers in the Analog/Handlers folder, with examples for each in the examples folder. These include:

So while it's a micro class, it's highly extensible and very capable out of the box too.

Rationale

I wrote this because I wanted something very small and simple like KLogger, and preferably not torn out of a wider framework if possible. After searching, I wasn't happy with the single-purpose libraries I found. With KLogger for example, I didn't want an object instance but rather a static class, and I wanted more flexibility in the back-end.

I also found some that had the flexibility also had more complexity, for example Monolog is dozens of source files (not incl. tests). With closures, this seemed to be a good balance of small without sacrificing flexibility.

What about Analog, the logfile analyzer? Well, since it hasn't been updated since 2004, I think it's safe to call a single-file PHP logging class the same thing without it being considered stepping on toes :)


All versions of analog with dependencies

PHP Build Version
Package Version
Requires psr/log Version ^3.0
php Version >=7.2
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 analog/analog contains the following files

Loading the files please wait ....