Download the PHP package phore/log without Composer

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

Phore log :: PSR-3 compatible logger

Phore Log combines PSR-3 logging with readable console output for exploratory development and structured module scopes.

Installation

Requires PHP 8.5 or newer.

Console logging

Console output uses semantic symbols and ANSI colors when the output stream is a TTY. Other drivers receive the same structured record without console escape sequences.

Message templates

For one or a few values, numeric context entries can be consumed positionally by {} placeholders from left to right:

Numeric and named context can be mixed. Numeric entries are consumed only by positional placeholders, while named entries can be referenced explicitly and unused named entries remain structured context:

The console renders Imported 17 records for acme source=csv.

Named context values remain useful when the field name itself is important:

Context keys used by placeholders are not repeated as trailing key=value fields.

Formatting can also be declared directly on a named context key:

Only the colon form is supported for context-key formats. An explicit format in the message template overrides the format declared on the context key, so {payload:full} can intentionally render a value inline even when the context contains payload:file.

Placeholder filters are written after a colon and can be combined with |:

Long values are shortened automatically in console/default output. More than 5 lines or 240 characters are compacted while retaining both the beginning and end, with the omitted amount shown as … +N lines … or … +N chars …. The structured context remains complete.

For file placeholders, strings are written unchanged, arrays are written as pretty multiline JSON, and objects are written with PHP serialize(). {:json|file} forces pretty JSON and {:serialize|file} forces serialized output. Files are named sequentially as phore-log-000001.txt, phore-log-000002.txt, and so on in the system temp directory. On the first file write of a new PHP process, leftover phore-log-*.txt files from the previous run are removed.

Literal braces can be escaped with {{ and }}.

Scoped child loggers

Child loggers inherit drivers, context and central configuration while adding a module scope:

A level configured for user is inherited by user.repository and deeper scopes. More specific scope rules win. user.* is accepted as an explicit subtree rule.

Context

Context stays structured for non-console drivers and is inherited by child loggers.

For short-lived context, use inContext(). The callback receives a child logger and the parent logger is unchanged afterwards:

Failure buffer

A buffered console logger keeps recent log records in memory and stays silent until a configured failure level occurs. The buffered records are then replayed in order, followed by the triggering error. Afterwards the buffer starts a new cycle.

This is intended as a separate diagnostic logger for exploratory development, so verbose traces do not flood normal console output.

Semantic console types

Besides the PSR-3 methods, Phore Log provides step(), success(), result(), detail(), skip() and failure(). These are presentation semantics, not additional severity levels: e.g. success() is an INFO record and detail() is DEBUG.

URI configuration

Supported targets include def://stderr, def://stdout, console://stderr, file:///path/to/file.log and syslog+udp://host:port.

See examples/01-console.php through examples/06-message-templates.php for the complete example sequence.


All versions of log with dependencies

PHP Build Version
Package Version
No informations.
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 phore/log contains the following files

Loading the files please wait ...