Download the PHP package initphp/logger without Composer

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

InitPHP Logger

A small, focused, PSR-3 compliant logger for PHP 8.0+. Ships with two built-in handlers and a tiny multiplexer that fans every log record out to several handlers at once.

Latest Stable Version Total Downloads License PHP Version Require

At a glance

Everything implements Psr\Log\LoggerInterface (PSR-3 v3), so you can drop the package into any framework or library that consumes that contract — or compose it with handlers from other PSR-3 packages.

Requirements

Requirement Version
PHP >= 8.0
psr/log ^3.0
ext-pdo Required only for PDOLogger

Installation

Quick start

Produces, for example:

Handlers

FileLogger

Path tokens ({year}, {month}, {day}, {hour}, {minute}, {second}) are resolved once, at construction time, against the process clock. The parent directory is created automatically (mode 0775) if it does not already exist. Writes use FILE_APPEND | LOCK_EX, so concurrent processes do not interleave bytes within a single record.

Full reference: docs/02-file-logger.md.

PDOLogger

Reference DDL for MySQL:

PostgreSQL and SQLite variants are documented in docs/03-pdo-logger.md.

Multi-handler logging

Logger accepts any Psr\Log\LoggerInterface, including handlers from other PSR-3 packages — see docs/05-custom-handlers.md.

PSR-3 surface

Every handler exposes the full PSR-3 API:

Context placeholders ({name}) are expanded with the matching key from $context. Booleans render as true / false, null renders as the empty string, \Throwable values render as Class(code): message in file:line, and anything implementing __toString() is cast to string. Arrays and non-stringable objects are skipped — see docs/06-psr3-context.md.

Unknown log levels throw Psr\Log\InvalidArgumentException, per PSR-3 §1.1.

Documentation

Topic-by-topic guides live in docs/:

Testing the package itself

Contributing

Please read the org-wide CONTRIBUTING.md before opening a pull request. Bug reports and feature ideas go through Issues and Discussions.

Security

If you discover a security vulnerability, please follow the instructions in the org-wide SECURITY.md. Do not open a public issue.

License

Released under the MIT License. Copyright © InitPHP.


All versions of logger with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
psr/log Version ^3.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 initphp/logger contains the following files

Loading the files please wait ...