Download the PHP package pls/log without Composer

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

Pls/Log

Version semver License

This package describes a common interface for logging libraries. Its goal is to allow libraries to receive an object implementing Pls\Log\Logger and write logs to it in a simple and universal way.

The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in RFC 2119.

1. Specification

Implementations MUST implement the specified functionality entirely and MAY provide more functionality than specified.

The Pls\Log\LoggerInterface exposes a method, log, to log messages. log accepts three arguments: $level, $message and $context (optional).

1.1 $level

This is an int value, corresponding to one of the eight RFC 5424 severity levels.

An interface, LogLevel, provides constants with semantic labels mapped to the int severity levels. Users are RECOMMENDED to pass these constants as $level values.

Passing a $level value that is not defined by this specification, i.e. that is not >= 0 and <= 7, MUST throw an instance of Pls\Log\InvalidSeverity.

1.2 $message

This is a user-defined string value to log.

The message MAY contain placeholders which implementors MAY replace with values from the context array.

Placeholder names MUST correspond to keys in the context array.

Placeholder names MUST be delimited with a single opening brace { and a single closing brace }. There MUST NOT be any whitespace between the delimiters and the placeholder name.

Placeholder names MUST be composed only of the characters A-Z, a-z, 0-9, underscore _, and period ..

Implementors MAY use placeholders to implement various escaping strategies and translate logs for display. Users SHOULD NOT pre-escape placeholder values since they can not know in which context the data will be displayed.

Passing a $message value that contains a malformed placeholder name MUST throw an instance of Pls\Log\InvalidMessage.

1.3 $context

This is an optional user-defined array; the default value is an empty array, []. This is meant to hold any extraneous information that does not fit well in a string. The array can contain anything. A given value in the context MUST NOT throw an exception nor raise any PHP error, warning or notice.

Array keys and values MAY be of any type PHP permits and MAY be of different types within a $context array, except that an array key corresponding to a placeholder name must be a string, identical to the placeholder name in $message.

An array value MUST be provided for each placeholder name in $message. Passing a $context array that does not contain a key corresponding to a placeholder name which is present in the passed $message MUST throw an instance of Pls\Log\InvalidContext.

If an object implementing \Throwable is passed in the context data, it MUST be in the 'thrown' key. Logging exceptions is a common pattern and this allows implementors to extract a stack trace from the exception when the log backend supports it. Implementors MUST still verify that the 'thrown' key is actually a \Thowable before using it as such, as it MAY contain anything.

1.4 Exceptions

All exceptions thrown by implementations MUST implement Pls\Log\LoggerException.

2. Package

The interfaces are provided as part of the pls/log package.

Packages providing a pls/log implementation SHOULD declare that they provide pls/log-implementation 1.0.0.

Projects requiring an implementation SHOULD require pls/log-implementation ^1.0.0.

3. Installation

To install with composer:

Requires PHP >= 7.3.

4. License

This package is released under the MIT license.


All versions of log with dependencies

PHP Build Version
Package Version
Requires php Version ^7.3
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 pls/log contains the following files

Loading the files please wait ....