caipan_shop_admin/vendor/casbin/psr3-bridge
wangxinglong 4aab76d038 setter 2022-05-25 19:35:57 +08:00
..
.github/workflows setter 2022-05-25 19:35:57 +08:00
src setter 2022-05-25 19:35:57 +08:00
tests setter 2022-05-25 19:35:57 +08:00
.gitignore setter 2022-05-25 19:35:57 +08:00
.phpunit.result.cache setter 2022-05-25 19:35:57 +08:00
.releaserc.yml setter 2022-05-25 19:35:57 +08:00
.travis.yml setter 2022-05-25 19:35:57 +08:00
LICENSE setter 2022-05-25 19:35:57 +08:00
README.md setter 2022-05-25 19:35:57 +08:00
composer.json setter 2022-05-25 19:35:57 +08:00
phpunit.xml setter 2022-05-25 19:35:57 +08:00

README.md

PSR-3 Bridge for PHP-Casbin Logger

Build Status Coverage Status Latest Stable Version Total Downloads License

This library provides a PSR-3 compliant bridge for PHP-Casbin Logger.

Casbin is a powerful and efficient open-source access control library.

Installation

Via Composer.

composer require casbin/psr3-bridge

Usage

Here is an example of using Monolog, Monolog implements the PSR-3 interface.

You can use any other library that implements PSR-3 interface.


use Casbin\Bridge\Logger\LoggerBridge;
use Casbin\Log\Log;
use Monolog\Logger;
use Monolog\Handler\StreamHandler;


$log = new Logger('name');
$log->pushHandler(new StreamHandler('path/to/your.log', Logger::WARNING));


Log::setLogger(new LoggerBridge($log));

Getting Help

License

This project is licensed under the Apache 2.0 license.