@ -25,13 +27,16 @@ This library attempts what we're calling an "opinionated" implementation of PSR-
## Requirements ##
## Requirements ##
* PHP 8.1 or newer with the following _optional_ extensions:
* PHP 8.1 or newer with the following _optional, but suggested_ extensions:
* ext-ctype
* ext-ctype
* ext-mbstring
* ext-mbstring
* [mensbeam/filesystem][g]: ">=1.0"
* [symfony/polyfill-ctype][i]: ">=1.8"
* [symfony/polyfill-mbstring][j]: ">=1.8"
### Note ###
### Note ###
This library uses [mensbeam/filesystem][g] which provides polyfills for `ext-ctype` and `ext-mbstring`. If you have these extensions installed the polyfills won't be used. However, they are still installed. If you don't want the polyfills needlessly installed you can add this to your project's `composer.json`:
This library uses [mensbeam/filesystem][g] which provides polyfills for `ext-ctype` and `ext-mbstring`. If you have these extensions installed the polyfills won't be used. However, they are still installed. If you don't want the polyfills needlessly installed you can add this to your project's `composer.json`:
```json
```json
{
{
@ -220,6 +225,7 @@ Takes a provided PSR-3 string level and returns a `Level` enum.
Returns a PSR-3 string level representation of the enum.
Returns a PSR-3 string level representation of the enum.
### MensBeam\Logger\Handler ###
### MensBeam\Logger\Handler ###
Handlers inherit from this abstract class. Since it is an abstract class meant for constructing handlers protected methods and properties will be documented here as well.
Handlers inherit from this abstract class. Since it is an abstract class meant for constructing handlers protected methods and properties will be documented here as well.
@ -252,7 +258,7 @@ _levels_: This is where the levels the handler is configured to support are stor
#### Options ####
#### Options ####
Properties which begin with an underscore are all options. They can be set either through the constructor or via `setHandler` by name, removing the underscore (\_) at the beginning. All handlers inherit these options. Options in inherited classes should also begin with an underscore (\_). How to extend `Handler` will be explained further down in the document.
Properties which begin with an underscore are all options. They can be set either through the constructor or via `setHandler` by name, removing the underscore (\_) at the beginning. All handlers inherit these options. Options in inherited classes should also begin with an underscore (\_).
_bubbles_: When set to true the stack loop will continue onto the next handler; if false it won't. Defaults to _true_
_bubbles_: When set to true the stack loop will continue onto the next handler; if false it won't. Defaults to _true_
_messageTransform_: A callable to use to transform messages before outputting. Defaults to _null_
_messageTransform_: A callable to use to transform messages before outputting. Defaults to _null_
@ -280,4 +286,42 @@ Outputs/dispatches the log entry