A Monolog plugin for WordPress named in honor of Margaret Lanterman. The plugin makes a PSR-3 logger interface available to WordPress through the implementation of the excellent Monolog.
Install the latest version with
$ composer require athletics/log-ladyRequire Composer's autoload.php from your theme's functions.php. For example, if composer.json resides at the root of your WordPress install, you might add this to functions.php:
require_once( ABSPATH . 'vendor/autoload.php' );Use in your theme files by adding the following lines:
<?php
use Athletics\Manifest\LogLady;
$log = new LogLady();
$log->debug( 'Debug!' );This defaults to a log named LogLady at the path wp-content/log-lady.log with a log level of Debug.
To change any of these defaults, pass the following argument(s) in an array:
- 'name' => 'LogLady'
- 'path' => ABSPATH . 'wp-content/log-lady.log'
- 'level' => 'Logger::DEBUG'
Please see CHANGELOG for information about what has changed recently.
$ composer testPlease see CONTRIBUTING for details.
If you discover any security related issues, please email wordpress@athleticsnyc.com instead of using the issue tracker.
- jp1971
- Special thanks to matthewspencer for his ears and advice.
The MIT License (MIT). Please see License File for more information.