diff options
-rw-r--r-- | php-Analog-php7.patch | 128 |
1 files changed, 0 insertions, 128 deletions
diff --git a/php-Analog-php7.patch b/php-Analog-php7.patch deleted file mode 100644 index 379698f..0000000 --- a/php-Analog-php7.patch +++ /dev/null @@ -1,128 +0,0 @@ -From e9edc16f45f4205246ae9ed0ce623910a7111dfd Mon Sep 17 00:00:00 2001 -From: Johnny Broadway <johnny@johnnybroadway.com> -Date: Mon, 25 May 2015 09:17:40 -0500 -Subject: [PATCH] Renamed Null to Ignore for PHP7 compatibility - ---- - README.md | 2 +- - examples/ignore.php | 9 +++++++++ - examples/null.php | 9 --------- - lib/Analog/Handler/Ignore.php | 20 ++++++++++++++++++++ - lib/Analog/Handler/Null.php | 3 +++ - 5 files changed, 33 insertions(+), 10 deletions(-) - create mode 100644 examples/ignore.php - delete mode 100644 examples/null.php - create mode 100644 lib/Analog/Handler/Ignore.php - -diff --git a/README.md b/README.md -index a21891b..ee90b5d 100644 ---- a/README.md -+++ b/README.md -@@ -25,11 +25,11 @@ with examples for each in the examples folder. These include: - * File - Append messages to a file - * FirePHP - Send messages to [FirePHP](http://www.firephp.org/) browser plugin - * GELF - Send message to the [Graylog2](http://www.graylog2.org/) log management server -+* Ignore - Do nothing - * LevelBuffer - Buffer messages and send only if sufficient error level reached - * Mail - Send email notices - * Mongo - Save to MongoDB collection - * Multi - Send different log levels to different handlers --* Null - Do nothing - * Post - Send messages over HTTP POST to another machine - * Stderr - Send messages to STDERR - * Syslog - Send messages to syslog -diff --git a/examples/ignore.php b/examples/ignore.php -new file mode 100644 -index 0000000..f5f766e ---- /dev/null -+++ b/examples/ignore.php -@@ -0,0 +1,9 @@ -+<?php -+ -+require '../lib/Analog.php'; -+ -+Analog::handler (Analog\Handler\Ignore::init ()); -+ -+Analog::log ('Hellooooooo'); -+ -+?> -\ No newline at end of file -diff --git a/examples/null.php b/examples/null.php -deleted file mode 100644 -index aa24a3b..0000000 ---- a/examples/null.php -+++ /dev/null -@@ -1,9 +0,0 @@ --<?php -- --require '../lib/Analog.php'; -- --Analog::handler (Analog\Handler\Null::init ()); -- --Analog::log ('Hellooooooo'); -- --?> -\ No newline at end of file -diff --git a/lib/Analog/Handler/Ignore.php b/lib/Analog/Handler/Ignore.php -new file mode 100644 -index 0000000..57c67b5 ---- /dev/null -+++ b/lib/Analog/Handler/Ignore.php -@@ -0,0 +1,20 @@ -+<?php -+ -+namespace Analog\Handler; -+ -+/** -+ * Ignores anything sent to it so you can disable logging. -+ * -+ * Usage: -+ * -+ * Analog::handler (Analog\Handler\Ignore::init ()); -+ * -+ * Analog::log ('Log me'); -+ */ -+class Ignore { -+ public static function init () { -+ return function ($info) { -+ // do nothing -+ }; -+ } -+} -\ No newline at end of file -diff --git a/lib/Analog/Handler/Null.php b/lib/Analog/Handler/Null.php -index 00a0017..29254eb 100644 ---- a/lib/Analog/Handler/Null.php -+++ b/lib/Analog/Handler/Null.php -@@ -3,6 +3,9 @@ - namespace Analog\Handler; - - /** -+ * Note: Deprecated because Null is a reserved word in PHP7. -+ * Please use Analog\Handler\Ignore instead. -+ * - * Ignores anything sent to it so you can disable logging. - * - * Usage: -From 69615c0e8b4033169b45d58f778fd3ba638d1d52 Mon Sep 17 00:00:00 2001 -From: Johnny Broadway <johnny@johnnybroadway.com> -Date: Mon, 25 May 2015 10:23:49 -0500 -Subject: [PATCH] Replaced mention of Null with Ignore - ---- - lib/Analog/Handler/Multi.php | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lib/Analog/Handler/Multi.php b/lib/Analog/Handler/Multi.php -index dff0887..332e5ed 100644 ---- a/lib/Analog/Handler/Multi.php -+++ b/lib/Analog/Handler/Multi.php -@@ -19,7 +19,7 @@ - * Analog::WARNING => Analog\Handler\File::init( 'logs/warnings.log' ), - * - * // Debug and info messages sent here -- * Analog::DEBUG => Analog\Handler\Null::init() // do nothing -+ * Analog::DEBUG => Analog\Handler\Ignore::init() // do nothing - * ) ) ); - * - * // will be ignored |