From 71b8217de1e2977c6d89e85830e6c1e3019ae43a Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Sun, 17 Feb 2013 17:50:33 +0100 Subject: [PATCH] Properly implement the PSR logger interface --- .gitignore | 1 + composer.json | 3 +++ composer.lock | 51 +++++++++++++++++++++++++++++++++++++++++++++++ index.php | 5 +++-- src/class.log.php | 12 +---------- 5 files changed, 59 insertions(+), 13 deletions(-) create mode 100644 .gitignore create mode 100644 composer.lock diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..22d0d82 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +vendor diff --git a/composer.json b/composer.json index 50a4101..c5327ce 100644 --- a/composer.json +++ b/composer.json @@ -20,6 +20,9 @@ "issues": "https://github.com/Joeynoh/PHP-Log-Class/issues", "source": "https://github.com/Joeynoh/PHP-Log-Class/" }, + "require": { + "psr/log": "~1.0" + }, "autoload": { "psr-3": { "PHP-Log-Class": "" } }, diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..335cb76 --- /dev/null +++ b/composer.lock @@ -0,0 +1,51 @@ +{ + "hash": "00f892a2a82de6ed06ad3cd8dd7848fc", + "packages": [ + { + "name": "psr/log", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log", + "reference": "1.0.0" + }, + "dist": { + "type": "zip", + "url": "https://github.com/php-fig/log/archive/1.0.0.zip", + "reference": "1.0.0", + "shasum": "" + }, + "time": "2012-12-21 11:40:51", + "type": "library", + "autoload": { + "psr-0": { + "Psr\\Log\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "keywords": [ + "log", + "psr", + "psr-3" + ] + } + ], + "packages-dev": null, + "aliases": [ + + ], + "minimum-stability": "stable", + "stability-flags": [ + + ] +} diff --git a/index.php b/index.php index 0a2005f..980ba92 100644 --- a/index.php +++ b/index.php @@ -53,8 +53,9 @@ 'example.log', 'secondary' => 'example_two.log')); $log->clear(); diff --git a/src/class.log.php b/src/class.log.php index 7e4cfd3..83952d4 100644 --- a/src/class.log.php +++ b/src/class.log.php @@ -1,16 +1,6 @@