BryanDavis has uploaded a new change for review.
https://gerrit.wikimedia.org/r/178077
Change subject: Use bd808/monolog-udp2log-handler
......................................................................
Use bd808/monolog-udp2log-handler
Replace local MwLogHandler class with \Monolog\Handler\Udp2logHandler
from bd808/monolog-udp2log-handler package.
Change-Id: I4d67465fff57068e18b967fe6e32881d855a82a4
---
M composer.json
M composer.lock
M src/Wikimania/Scholarship/App.php
D src/Wikimania/Scholarship/MwLogHandler.php
M vendor/autoload.php
A vendor/bd808/monolog-udp2log-handler/.gitignore
A vendor/bd808/monolog-udp2log-handler/.travis.yml
A vendor/bd808/monolog-udp2log-handler/LICENSE.txt
A vendor/bd808/monolog-udp2log-handler/README.md
A vendor/bd808/monolog-udp2log-handler/composer.json
A vendor/bd808/monolog-udp2log-handler/phpunit.xml.dist
A vendor/bd808/monolog-udp2log-handler/src/Udp2log/StreamWriter.php
A vendor/bd808/monolog-udp2log-handler/src/Udp2log/UdpWriter.php
A vendor/bd808/monolog-udp2log-handler/src/Udp2log/Writer.php
A vendor/bd808/monolog-udp2log-handler/src/Udp2logHandler.php
A vendor/bd808/monolog-udp2log-handler/tests/TestCase.php
A vendor/bd808/monolog-udp2log-handler/tests/Udp2log/UdpWriterTest.php
A vendor/bd808/monolog-udp2log-handler/tests/Udp2logHandlerTest.php
A vendor/bd808/monolog-udp2log-handler/tests/bootstrap.php
M vendor/composer/autoload_classmap.php
M vendor/composer/autoload_psr4.php
M vendor/composer/autoload_real.php
M vendor/composer/installed.json
23 files changed, 987 insertions(+), 226 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/wikimedia/wikimania-scholarships
refs/changes/77/178077/1
diff --git a/composer.json b/composer.json
index 8304733..5577cb6 100644
--- a/composer.json
+++ b/composer.json
@@ -6,7 +6,8 @@
"slim/slim": "2.4.3",
"slim/views": "0.1.2",
"monolog/monolog": "1.11.0",
- "phpmailer/phpmailer": "v5.2.9"
+ "phpmailer/phpmailer": "v5.2.9",
+ "bd808/monolog-udp2log-handler": "1.0.0"
},
"preferred-install": "dist",
"autoload": {
diff --git a/composer.lock b/composer.lock
index ebc7ca6..18adce0 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,9 +4,57 @@
"Read more about it at
http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
- "hash": "bfee97d4879ab060b1d35541af609c3c",
+ "hash": "1efa738adfd55a0858cda45f85786b3e",
"packages": [
{
+ "name": "bd808/monolog-udp2log-handler",
+ "version": "v1.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/bd808/udp2log-monolog-handler.git",
+ "reference": "9cef81fda240a651c3b934fb24b9ea48a4824e1b"
+ },
+ "dist": {
+ "type": "zip",
+ "url":
"https://api.github.com/repos/bd808/udp2log-monolog-handler/zipball/9cef81fda240a651c3b934fb24b9ea48a4824e1b",
+ "reference": "9cef81fda240a651c3b934fb24b9ea48a4824e1b",
+ "shasum": ""
+ },
+ "require": {
+ "monolog/monolog": "~1.6",
+ "php": ">=5.3.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.0"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Monolog\\Handler\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Bryan Davis",
+ "homepage": "http://bd808.com",
+ "role": "Developer"
+ }
+ ],
+ "description": "A handler for Monolog that emits udp2log
datagrams.",
+ "homepage": "https://github.com/bd808/monolog-udp2log-handler",
+ "keywords": [
+ "log",
+ "mediawiki",
+ "monolog",
+ "udp2log"
+ ],
+ "time": "2014-09-14 17:15:23"
+ },
+ {
"name": "monolog/monolog",
"version": "1.11.0",
"source": {
diff --git a/src/Wikimania/Scholarship/App.php
b/src/Wikimania/Scholarship/App.php
index d721506..c9e33dc 100644
--- a/src/Wikimania/Scholarship/App.php
+++ b/src/Wikimania/Scholarship/App.php
@@ -188,7 +188,10 @@
$level = constant( "\Monolog\Logger::{$level}" );
$log = new \Monolog\Logger( 'scholarships' );
- $handler = new MwLogHandler( $c->settings['log.file'],
$level );
+ $handler = new \Monolog\Handler\Udp2logHandler(
+ $c->settings['log.file'],
+ $level
+ );
$handler->setFormatter( new
\Monolog\Formatter\LogstashFormatter(
'scholarships', null, null, '',
\Monolog\Formatter\LogstashFormatter::V1
diff --git a/src/Wikimania/Scholarship/MwLogHandler.php
b/src/Wikimania/Scholarship/MwLogHandler.php
deleted file mode 100644
index 14f5cc6..0000000
--- a/src/Wikimania/Scholarship/MwLogHandler.php
+++ /dev/null
@@ -1,217 +0,0 @@
-<?php
-/**
- * @section LICENSE
- * This file is part of Wikimania Scholarship Application.
- *
- * Wikimania Scholarship Application is free software: you can redistribute it
- * and/or modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation, either version 3 of the License,
- * or (at your option) any later version.
- *
- * Wikimania Scholarship Application is distributed in the hope that it will
- * be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
- * Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with Wikimania Scholarship Application. If not, see
- * <http://www.gnu.org/licenses/>.
- *
- * @file
- */
-
-namespace Wikimania\Scholarship;
-
-use Monolog\Handler\AbstractProcessingHandler;
-use Monolog\Logger;
-
-
-/**
- * Log handler that replicates the behavior of MediaWiki's wfErrorLog()
- * logging service. Log output can be directed to a local file, a PHP stream,
- * or a udp2log server.
- *
- * For udp2log output, the stream specification must have the form:
- * "udp://HOST:PORT[/PREFIX]"
- * where:
- * - HOST: IPv4, IPv6 or hostname
- * - PORT: server port
- * - PREFIX: optional (but recommended) prefix telling udp2log how to route
- * the log event
- *
- * When not targeting a udp2log stream this class will act as a drop-in
- * replacement for Monolog's StreamHandler.
- *
- * @author Bryan Davis <[email protected]>
- * @copyright © 2013 Bryan Davis and Wikimedia Foundation.
- */
-class MwLogHandler extends AbstractProcessingHandler {
-
- /**
- * Log sink descriptor
- * @var string $uri
- */
- protected $uri;
-
- /**
- * Log sink
- * @var resource $sink
- */
- protected $sink;
-
- /**
- * @var string $error
- */
- protected $error;
-
- /**
- * @var string $host
- */
- protected $host;
-
- /**
- * @var int $port
- */
- protected $port;
-
- /**
- * @var string $prefix
- */
- protected $prefix;
-
-
- /**
- * @param string $stream Stream URI
- * @param int $level Minimum logging level that will trigger handler
- * @param bool $bubble Can handled meesages bubble up the handler stack?
- */
- public function __construct(
- $stream, $level = Logger::DEBUG, $bubble = true
- ){
- parent::__construct( $level, $bubble );
- $this->uri = $stream;
- }
-
-
- /**
- * Open the log sink described by our stream URI.
- */
- protected function openSink() {
- if ( !$this->uri ) {
- throw new \LogicException(
- 'Missing stream uri, the stream can not be
opened.' );
- }
- $this->error = null;
- set_error_handler( array( $this, 'errorTrap' ) );
-
- if ( substr( $this->uri, 0, 4 ) == 'udp:' ) {
- $parsed = parse_url( $this->uri );
- if ( !isset( $parsed['host'] ) ) {
- throw new \UnexpectedValueException( sprintf(
- 'Udp transport "%s" must specify a
host', $this->uri
- ) );
- }
- if ( !isset( $parsed['port'] ) ) {
- throw new \UnexpectedValueException( sprintf(
- 'Udp transport "%s" must specify a
port', $this->uri
- ) );
- }
-
- $this->host = $parsed['host'];
- $this->port = $parsed['port'];
- $this->prefix = '';
-
- if ( isset( $parsed['path'] ) ) {
- $this->prefix = ltrim( $parsed['path'], '/' );
- }
-
- if ( filter_var( $this->host, \FILTER_VALIDATE_IP,
\FILTER_FLAG_IPV6 ) ) {
- $domain = \AF_INET6;
-
- } else {
- $domain = \AF_INET;
- }
-
- $this->sink = socket_create( $domain, \SOCK_DGRAM,
\SOL_UDP );
-
- } else {
- $this->sink = fopen( $this->uri, 'a' );
- }
- restore_error_handler();
-
- if ( !is_resource( $this->sink ) ) {
- $this->sink = null;
- throw new \UnexpectedValueException( sprintf(
- 'The stream or file "%s" could not be opened:
%s',
- $this->uri, $this->error
- ) );
- }
- }
-
-
- /**
- * Custom error handler.
- * @param int $code Error number
- * @param string $msg Error message
- */
- protected function errorTrap( $code, $msg ) {
- $this->error = $msg;
- }
-
-
- /**
- * Should we use UDP to send messages to the sink?
- * @return bool
- */
- protected function useUdp() {
- return $this->host !== null;
- }
-
-
- protected function write( array $record ) {
- if ( $this->sink === null ) {
- $this->openSink();
- }
-
- $text = (string) $record['formatted'];
- if ( $this->useUdp() ) {
-
- // Clean it up for the multiplexer
- if ( $this->prefix !== '' ) {
- $text = preg_replace( '/^/m', "{$this->prefix}
", $text );
-
- // Limit to 64KB
- if ( strlen( $text ) > 65506 ) {
- $text = substr( $text, 0, 65506 );
- }
-
- if ( substr( $text, -1 ) != "\n" ) {
- $text .= "\n";
- }
-
- } elseif ( strlen( $text ) > 65507 ) {
- $text = substr( $text, 0, 65507 );
- }
-
- socket_sendto(
- $this->sink, $text, strlen( $text ), 0,
$this->host, $this->port );
-
- } else {
- fwrite( $this->sink, $text );
- }
- }
-
-
- public function close() {
- if ( is_resource( $this->sink ) ) {
- if ( $this->useUdp() ) {
- socket_close( $this->sink );
-
- } else {
- fclose( $this->sink );
- }
- }
- $this->sink = null;
- }
-
-} //end MwLogHandler
diff --git a/vendor/autoload.php b/vendor/autoload.php
index 553611e..0cac6e1 100644
--- a/vendor/autoload.php
+++ b/vendor/autoload.php
@@ -4,4 +4,4 @@
require_once __DIR__ . '/composer' . '/autoload_real.php';
-return ComposerAutoloaderInit2564ffb18f36cd909cec686b12a0766f::getLoader();
+return ComposerAutoloaderInitbfcb8b0812b2c1bc79a08faa1d621831::getLoader();
diff --git a/vendor/bd808/monolog-udp2log-handler/.gitignore
b/vendor/bd808/monolog-udp2log-handler/.gitignore
new file mode 100644
index 0000000..18b7007
--- /dev/null
+++ b/vendor/bd808/monolog-udp2log-handler/.gitignore
@@ -0,0 +1,4 @@
+.php-version
+composer.lock
+vendor
+report
diff --git a/vendor/bd808/monolog-udp2log-handler/.travis.yml
b/vendor/bd808/monolog-udp2log-handler/.travis.yml
new file mode 100644
index 0000000..32ae5c3
--- /dev/null
+++ b/vendor/bd808/monolog-udp2log-handler/.travis.yml
@@ -0,0 +1,12 @@
+language: php
+php:
+ - 5.3
+ - 5.4
+ - 5.5
+ - 5.6
+ - hhvm
+before_script:
+ - composer install --dev
+notifications:
+ email:
+ - [email protected]
diff --git a/vendor/bd808/monolog-udp2log-handler/LICENSE.txt
b/vendor/bd808/monolog-udp2log-handler/LICENSE.txt
new file mode 100644
index 0000000..c69a00a
--- /dev/null
+++ b/vendor/bd808/monolog-udp2log-handler/LICENSE.txt
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Bryan Davis and Wikimedia Foundation
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/vendor/bd808/monolog-udp2log-handler/README.md
b/vendor/bd808/monolog-udp2log-handler/README.md
new file mode 100644
index 0000000..822245b
--- /dev/null
+++ b/vendor/bd808/monolog-udp2log-handler/README.md
@@ -0,0 +1,44 @@
+udp2log-monolog-handler
+=======================
+
+[Monolog][] handler that replicates the behavior of the [MediaWiki][]
+wfErrorLog() logging system. Log output can be directed to a local file, a PHP
+stream, or a udp2log server.
+
+[![Build Status][ci-status]][ci-home]
+
+
+Installation
+------------
+udp2log-monolog-handler is available on Packagist
+([bd808/udp2log-monolog-handler][]) and is installable via [Composer][].
+
+ {
+ "require": {
+ "bd808/udp2log-monolog-handler": "dev-master"
+ }
+ }
+
+If you do not use Composer, you can get the source from GitHub and use any
+PSR-4 compatible autoloader.
+
+ $ git clone https://github.com/bd808/udp2log-monolog-handler.git
+
+
+Run the tests
+-------------
+Tests are automatically performed by [Travis CI][]:
+[![Build Status][ci-status]][ci-home]
+
+ curl -sS https://getcomposer.org/installer | php
+ php composer.phar install --dev
+ phpunit
+
+---
+[Monolog]: https://github.com/Seldaek/monolog
+[MediaWiki]: https://www.mediawiki.org/wiki/MediaWiki
+[ci-status]: https://travis-ci.org/bd808/udp2log-monolog-handler.png
+[ci-home]: https://travis-ci.org/bd808/udp2log-monolog-handler
+[bd808/udp2log-monolog-handler]:
https://packagist.org/packages/bd808/udp2log-monolog-handler
+[Composer]: https://getcomposer.org
+[Travis CI]: https://travis-ci.org
diff --git a/vendor/bd808/monolog-udp2log-handler/composer.json
b/vendor/bd808/monolog-udp2log-handler/composer.json
new file mode 100644
index 0000000..5999474
--- /dev/null
+++ b/vendor/bd808/monolog-udp2log-handler/composer.json
@@ -0,0 +1,24 @@
+{
+ "name": "bd808/monolog-udp2log-handler",
+ "description": "A handler for Monolog that emits udp2log datagrams.",
+ "keywords": ["monolog", "log", "udp2log", "MediaWiki"],
+ "homepage": "https://github.com/bd808/monolog-udp2log-handler",
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "Bryan Davis",
+ "homepage": "http://bd808.com",
+ "role": "Developer"
+ }
+ ],
+ "require": {
+ "php": ">=5.3.0",
+ "monolog/monolog": "~1.6"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.0"
+ },
+ "autoload": {
+ "psr-4": {"Monolog\\Handler\\": "src"}
+ }
+}
diff --git a/vendor/bd808/monolog-udp2log-handler/phpunit.xml.dist
b/vendor/bd808/monolog-udp2log-handler/phpunit.xml.dist
new file mode 100644
index 0000000..4797212
--- /dev/null
+++ b/vendor/bd808/monolog-udp2log-handler/phpunit.xml.dist
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<phpunit backupGlobals="false"
+ backupStaticAttributes="false"
+ bootstrap="tests/bootstrap.php"
+ colors="true"
+ strict="true"
+ verbose="true">
+ <!--
+ convertErrorsToExceptions="true"
+ convertNoticesToExceptions="true"
+ convertWarningsToExceptions="true"
+ -->
+ <testsuites>
+ <testsuite name="Udp2log Test Suite">
+ <directory suffix="Test.php">./tests/</directory>
+ </testsuite>
+ </testsuites>
+
+ <logging>
+ <log type="tap" target="php://stdout" logIncompleteSkipped="true"/>
+ <log type="coverage-text" target="php://stdout"
showUncoveredFiles="true"/>
+ </logging>
+
+ <filter>
+ <whitelist addUncoveredFilesFromWhitelist="true">
+ <directory suffix=".php">./src</directory>
+ </whitelist>
+ </filter>
+</phpunit>
diff --git a/vendor/bd808/monolog-udp2log-handler/src/Udp2log/StreamWriter.php
b/vendor/bd808/monolog-udp2log-handler/src/Udp2log/StreamWriter.php
new file mode 100644
index 0000000..bc6be03
--- /dev/null
+++ b/vendor/bd808/monolog-udp2log-handler/src/Udp2log/StreamWriter.php
@@ -0,0 +1,73 @@
+<?php
+/**
+ * @section LICENSE
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2014 Bryan Davis and Wikimedia Foundation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including without
+ * limitation the rights to use, copy, modify, merge, publish, distribute,
+ * sublicense, and/or sell copies of the Software, and to permit persons to
+ * whom the Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * @file
+ */
+
+namespace Monolog\Handler\Udp2log;
+
+
+/**
+ * @author Bryan Davis <[email protected]>
+ * @copyright © 2014 Bryan Davis and Wikimedia Foundation.
+ */
+class StreamWriter implements Writer
+{
+ /**
+ * @var resource $fhandle
+ */
+ protected $fhandle;
+
+
+ /**
+ * @param string $stream
+ */
+ public function __construct($stream)
+ {
+ $this->fhandle = fopen($stream, 'a');
+ }
+
+
+ /**
+ * @param string $message
+ * @param string $prefix Message prefix
+ */
+ public function write($message, $prefix = null)
+ {
+ if ($prefix !== null) {
+ $message = "{$prefix} {$message}";
+ }
+ fwrite($this->fhandle, $message);
+ }
+
+
+ public function close()
+ {
+ if ($this->fhandle !== null) {
+ fclose($this->fhandle);
+ }
+ }
+}
diff --git a/vendor/bd808/monolog-udp2log-handler/src/Udp2log/UdpWriter.php
b/vendor/bd808/monolog-udp2log-handler/src/Udp2log/UdpWriter.php
new file mode 100644
index 0000000..7ea8fa3
--- /dev/null
+++ b/vendor/bd808/monolog-udp2log-handler/src/Udp2log/UdpWriter.php
@@ -0,0 +1,123 @@
+<?php
+/**
+ * @section LICENSE
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2014 Bryan Davis and Wikimedia Foundation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including without
+ * limitation the rights to use, copy, modify, merge, publish, distribute,
+ * sublicense, and/or sell copies of the Software, and to permit persons to
+ * whom the Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * @file
+ */
+
+namespace Monolog\Handler\Udp2log;
+
+
+/**
+ * Udp2log message writer.
+ *
+ * @author Bryan Davis <[email protected]>
+ * @copyright © 2014 Bryan Davis and Wikimedia Foundation.
+ */
+class UdpWriter implements Writer
+{
+ /**
+ * @var string $host
+ */
+ protected $host;
+
+ /**
+ * @var int $port
+ */
+ protected $port;
+
+ /**
+ * @var resource $socket
+ */
+ protected $socket;
+
+
+ /**
+ * @param string $host Udp2log host
+ * @param int $port Udp2log port
+ */
+ public function __construct($host, $port)
+ {
+ $this->host = trim((string)$host, '[]');
+ $this->port = (int)$port;
+ if (filter_var($this->host, \FILTER_VALIDATE_IP, \FILTER_FLAG_IPV6)) {
+ $domain = \AF_INET6;
+ } else {
+ $domain = \AF_INET;
+ }
+ $this->socket = socket_create($domain, \SOCK_DGRAM, \SOL_UDP);
+ }
+
+
+ /**
+ * @param string $message
+ * @param string $prefix Message prefix
+ */
+ public function write($message, $prefix = null)
+ {
+ // Clean it up for the multiplexer
+ if ($prefix !== null) {
+ $message = preg_replace('/^/m', "{$prefix} ", $message);
+
+ // Limit to 64KB
+ if (strlen($message) > 65506) {
+ $message = substr($message, 0, 65506);
+ }
+
+ if (substr($message, -1) !== "\n") {
+ $message .= "\n";
+ }
+
+ } elseif (strlen($message) > 65507) {
+ $message = substr($message, 0, 65507);
+ if (substr($message, -1) !== "\n") {
+ $message = substr($message, 0, 65506) . "\n";
+ }
+ }
+
+ $this->send($message);
+ }
+
+
+ /**
+ * @param string $buffer
+ */
+ protected function send($buffer)
+ {
+ socket_sendto(
+ $this->socket, $buffer, strlen($buffer), 0,
+ $this->host, $this->port
+ );
+ }
+
+
+ public function close()
+ {
+ if (is_resource($this->socket)) {
+ socket_close($this->socket);
+ }
+ $this->socket = null;
+ }
+}
diff --git a/vendor/bd808/monolog-udp2log-handler/src/Udp2log/Writer.php
b/vendor/bd808/monolog-udp2log-handler/src/Udp2log/Writer.php
new file mode 100644
index 0000000..beacf05
--- /dev/null
+++ b/vendor/bd808/monolog-udp2log-handler/src/Udp2log/Writer.php
@@ -0,0 +1,46 @@
+<?php
+/**
+ * @section LICENSE
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2014 Bryan Davis and Wikimedia Foundation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including without
+ * limitation the rights to use, copy, modify, merge, publish, distribute,
+ * sublicense, and/or sell copies of the Software, and to permit persons to
+ * whom the Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * @file
+ */
+
+namespace Monolog\Handler\Udp2log;
+
+
+/**
+ * @author Bryan Davis <[email protected]>
+ * @copyright © 2014 Bryan Davis and Wikimedia Foundation.
+ */
+interface Writer
+{
+ /**
+ * @param string $message
+ * @param string $prefix Message prefix
+ */
+ public function write($message, $prefix = '');
+
+ public function close();
+}
diff --git a/vendor/bd808/monolog-udp2log-handler/src/Udp2logHandler.php
b/vendor/bd808/monolog-udp2log-handler/src/Udp2logHandler.php
new file mode 100644
index 0000000..ad00acb
--- /dev/null
+++ b/vendor/bd808/monolog-udp2log-handler/src/Udp2logHandler.php
@@ -0,0 +1,173 @@
+<?php
+/**
+ * @section LICENSE
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2014 Bryan Davis and Wikimedia Foundation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including without
+ * limitation the rights to use, copy, modify, merge, publish, distribute,
+ * sublicense, and/or sell copies of the Software, and to permit persons to
+ * whom the Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * @file
+ */
+
+namespace Monolog\Handler;
+
+use Monolog\Handler\AbstractProcessingHandler;
+use Monolog\Handler\Udp2log\StreamWriter;
+use Monolog\Handler\Udp2log\UdpWriter;
+use Monolog\Handler\Udp2log\Writer;
+use Monolog\Logger;
+
+
+/**
+ * Log handler that replicates the behavior of MediaWiki's wfErrorLog()
+ * logging service. Log output can be directed to a local file, a PHP stream,
+ * or a udp2log server.
+ *
+ * For udp2log output, the stream specification must have the form:
+ * "udp://HOST:PORT[/PREFIX]"
+ * where:
+ * - HOST: IPv4, IPv6 or hostname
+ * - PORT: server port
+ * - PREFIX: optional (but recommended) prefix telling udp2log how to route
+ * the log event
+ *
+ * When not targeting a udp2log stream this class will act as a drop-in
+ * replacement for Monolog's StreamHandler.
+ *
+ * @author Bryan Davis <[email protected]>
+ * @copyright © 2014 Bryan Davis and Wikimedia Foundation.
+ */
+class Udp2logHandler extends AbstractProcessingHandler
+{
+ /**
+ * Log destination descriptor
+ * @var string $uri
+ */
+ protected $uri;
+
+ /**
+ * @var Writer $writer
+ */
+ protected $writer;
+
+ /**
+ * @var string $error
+ */
+ protected $error;
+
+ /**
+ * @var string $prefix
+ */
+ protected $prefix;
+
+
+ /**
+ * @param string $stream Stream URI
+ * @param int $level Minimum logging level that will trigger handler
+ * @param bool $bubble Can handled meesages bubble up the handler stack?
+ */
+ public function __construct(
+ $stream,
+ $level = Logger::DEBUG,
+ $bubble = true
+ ) {
+ parent::__construct($level, $bubble);
+ $this->uri = $stream;
+ }
+
+
+ /**
+ * Open the log sink described by our stream URI.
+ */
+ protected function openSink()
+ {
+ if (!$this->uri) {
+ throw new \LogicException(
+ 'Missing stream uri, the stream can not be opened.'
+ );
+ }
+ $this->error = null;
+ set_error_handler(array($this, 'errorTrap'));
+
+ if (substr($this->uri, 0, 4) === 'udp:') {
+ $parsed = parse_url($this->uri);
+ if (!isset($parsed['host'])) {
+ throw new \UnexpectedValueException(sprintf(
+ 'Udp transport "%s" must specify a host', $this->uri
+ ));
+ }
+ if (!isset($parsed['port'])) {
+ throw new \UnexpectedValueException(sprintf(
+ 'Udp transport "%s" must specify a port', $this->uri
+ ));
+ }
+
+ $this->prefix = '';
+ if (isset($parsed['path'])) {
+ $this->prefix = ltrim($parsed['path'], '/');
+ }
+
+ $this->writer = new UdpWriter($parsed['host'], $parsed['port']);
+ } else {
+ $this->writer = new StreamWriter($this->uri);
+ }
+ restore_error_handler();
+
+ if ($this->error !== null) {
+ $this->writer = null;
+ throw new \UnexpectedValueException(sprintf(
+ 'The stream or file "%s" could not be opened: %s',
+ $this->uri, $this->error
+ ));
+ }
+ }
+
+
+ /**
+ * Custom error handler.
+ * @param int $code Error number
+ * @param string $msg Error message
+ */
+ public function errorTrap($code, $msg)
+ {
+ $this->error = $msg;
+ }
+
+
+ protected function write(array $record)
+ {
+ if ($this->writer === null) {
+ $this->openSink();
+ }
+
+ $text = (string) $record['formatted'];
+ $this->writer->write($text, $this->prefix);
+ }
+
+
+ public function close()
+ {
+ if ($this->writer !== null) {
+ $this->writer->close();
+ }
+ $this->writer = null;
+ }
+}
diff --git a/vendor/bd808/monolog-udp2log-handler/tests/TestCase.php
b/vendor/bd808/monolog-udp2log-handler/tests/TestCase.php
new file mode 100644
index 0000000..b8b974f
--- /dev/null
+++ b/vendor/bd808/monolog-udp2log-handler/tests/TestCase.php
@@ -0,0 +1,73 @@
+<?php
+namespace Monolog\Handler;
+
+class TestCase extends \PHPUnit_Framework_TestCase
+{
+
+ /**
+ * @var string $tmpFile
+ */
+ protected $tmpFile;
+
+ public function setUp()
+ {
+ parent::setUp();
+ $this->tmpFile = sys_get_temp_dir() . '/' . __CLASS__ . '-tmp';
+ if (file_exists($this->tmpFile)) {
+ unlink($this->tmpFile);
+ }
+ }
+
+ public function tearDown()
+ {
+ if (file_exists($this->tmpFile)) {
+ unlink($this->tmpFile);
+ }
+ parent::tearDown();
+ }
+
+
+ protected function getRecord(
+ $message = 'test',
+ $level = \Monolog\Logger::WARNING,
+ $context = array()
+ ) {
+ return array(
+ 'message' => $message,
+ 'context' => $context,
+ 'level' => $level,
+ 'level_name' => \Monolog\Logger::getLevelName($level),
+ 'channel' => 'test',
+ 'datetime' => \DateTime::createFromFormat(
+ 'U.u', sprintf('%.6F', microtime(true))
+ ),
+ 'extra' => array(),
+ );
+ }
+
+ /**
+ * Get protected/private member variable.
+ * @param object $obj
+ * @param string $member
+ * @return mixed
+ */
+ protected function getProp($obj, $member)
+ {
+ $prop = new \ReflectionProperty($obj, $member);
+ $prop->setAccessible(true);
+ return $prop->getValue($obj);
+ }
+
+ /**
+ * Set protected/private member variable.
+ * @param object $obj
+ * @param string $member
+ * @param mixed $value
+ */
+ protected function setProp($obj, $member, $value)
+ {
+ $prop = new \ReflectionProperty($obj, $member);
+ $prop->setAccessible(true);
+ $prop->setValue($obj, $value);
+ }
+}
diff --git
a/vendor/bd808/monolog-udp2log-handler/tests/Udp2log/UdpWriterTest.php
b/vendor/bd808/monolog-udp2log-handler/tests/Udp2log/UdpWriterTest.php
new file mode 100644
index 0000000..a7873b1
--- /dev/null
+++ b/vendor/bd808/monolog-udp2log-handler/tests/Udp2log/UdpWriterTest.php
@@ -0,0 +1,94 @@
+<?php
+namespace Monolog\Handler\Udp2log;
+
+use Monolog\Handler\TestCase;
+
+/**
+ * @coversDefaultClass \Monolog\Handler\Udp2log\UdpWriter
+ * @usesDefaultClass \Monolog\Handler\Udp2log\UdpWriter
+ * @uses ::<public>
+ * @uses ::<private>
+ * @uses ::<protected>
+ */
+class UdpWriterTest extends TestCase
+{
+
+ /**
+ * @dataProvider provideWriteCallsSend
+ * @covers ::write
+ */
+ public function testWriteCallsSend($message, $prefix, $expect)
+ {
+ $writer = $this->getMockBuilder(
+ '\\Monolog\\Handler\\Udp2log\\UdpWriter')
+ ->setMethods(array('send'))
+ ->setConstructorArgs(array('127.0.0.1', 9999))
+ ->getMock();
+
+ $writer->expects($this->once())
+ ->method('send')
+ ->with($expect);
+
+ $writer->write($message, $prefix);
+ }
+
+ public function provideWriteCallsSend()
+ {
+ return array(
+ array(
+ 'message',
+ null,
+ 'message',
+ ),
+ array(
+ 'message',
+ 'prefix',
+ "prefix message\n",
+ ),
+ array(
+ "foo\nbar\n",
+ 'prefix',
+ "prefix foo\nprefix bar\n",
+ ),
+ array(
+ str_repeat('x', 65508),
+ 'y',
+ 'y ' . str_repeat('x', 65504) . "\n",
+ ),
+ array(
+ str_repeat('x', 65508),
+ null,
+ str_repeat('x', 65506) . "\n",
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider provideOpenAndClose
+ * @covers ::__construct
+ * @covers ::close
+ */
+ public function testOpenAndClose($host, $port)
+ {
+ $fixture = new UdpWriter($host, $port);
+ $this->assertInternalType(
+ 'resource',
+ $this->getProp($fixture, 'socket')
+ );
+
+ $fixture->close();
+ $this->assertNull($this->getProp($fixture, 'socket'));
+ }
+
+ public function provideOpenAndClose()
+ {
+ return array(
+ array('127.0.0.1', '1234'),
+ array('::1', '1234'),
+ array('127.0.0.1', 1234),
+ array('::1', 1234),
+ array('[2001:db8:0:8d3:0:8a2e:70:7344]', 1234),
+ array('example.com', 1234),
+ );
+ }
+}
diff --git a/vendor/bd808/monolog-udp2log-handler/tests/Udp2logHandlerTest.php
b/vendor/bd808/monolog-udp2log-handler/tests/Udp2logHandlerTest.php
new file mode 100644
index 0000000..fe4cb5d
--- /dev/null
+++ b/vendor/bd808/monolog-udp2log-handler/tests/Udp2logHandlerTest.php
@@ -0,0 +1,151 @@
+<?php
+namespace Monolog\Handler;
+
+/**
+ * @coversDefaultClass \Monolog\Handler\Udp2logHandler
+ * @usesDefaultClass \Monolog\Handler\Udp2logHandler
+ * @uses ::<public>
+ * @uses ::<private>
+ * @uses ::<protected>
+ */
+class Udp2logHandlerTest extends TestCase
+{
+
+ /**
+ * @var Udp2logHandler $fixture
+ */
+ protected $fixture;
+
+ public function tearDown()
+ {
+ if ($this->fixture !== null) {
+ $this->fixture->close();
+ }
+ parent::tearDown();
+ }
+
+
+ /**
+ * @expectedException \LogicException
+ * @covers ::__construct
+ * @covers ::openSink
+ */
+ public function testNullStreamThrows()
+ {
+ $this->fixture = new Udp2logHandler(null);
+ $this->fixture->handle($this->getRecord('message'));
+ }
+
+ /**
+ * @expectedException \UnexpectedValueException
+ * @expectedExceptionMessage host
+ * @covers ::__construct
+ * @covers ::openSink
+ * @covers ::errorTrap
+ */
+ public function testUdpUriMissingHostThrows()
+ {
+ $this->fixture = new Udp2logHandler('udp://');
+ $this->fixture->handle($this->getRecord('message'));
+ }
+
+ /**
+ * @expectedException \UnexpectedValueException
+ * @expectedExceptionMessage port
+ * @covers ::__construct
+ * @covers ::openSink
+ * @covers ::errorTrap
+ */
+ public function testUdpUriMissingPortThrows()
+ {
+ $this->fixture = new Udp2logHandler('udp://127.0.0.1');
+ $this->fixture->handle($this->getRecord('message'));
+ }
+
+ /**
+ * @covers ::__construct
+ * @covers ::openSink
+ * @covers ::write
+ * @uses \Monolog\Handler\Udp2log\UdpWriter
+ */
+ public function testUdpUriCreatesUdpWriter()
+ {
+ $this->fixture = new Udp2logHandler('udp://127.0.0.1:123/foo');
+ $this->fixture->handle($this->getRecord('message'));
+
+ $this->assertEquals('foo', $this->getProp($this->fixture, 'prefix'));
+
+ $writer = $this->getProp($this->fixture, 'writer');
+ $this->assertInstanceOf(
+ '\\Monolog\\Handler\\Udp2log\\UdpWriter',
+ $writer
+ );
+ }
+
+ /**
+ * @covers ::__construct
+ * @covers ::openSink
+ * @covers ::write
+ * @uses \Monolog\Handler\Udp2log\StreamWriter
+ */
+ public function testFileUriCreatesStreamWriter()
+ {
+ $this->fixture = new Udp2logHandler($this->tmpFile);
+ $this->fixture->handle($this->getRecord('message'));
+
+ $this->assertNull($this->getProp($this->fixture, 'prefix'));
+
+ $writer = $this->getProp($this->fixture, 'writer');
+ $this->assertInstanceOf(
+ '\\Monolog\\Handler\\Udp2log\\StreamWriter',
+ $writer
+ );
+ $this->assertFileExists($this->tmpFile);
+ }
+
+ /**
+ * @covers ::__construct
+ * @covers ::write
+ * @covers ::close
+ */
+ public function testDeligatesToWriter()
+ {
+ $writer = $this->getMock('\Monolog\Handler\Udp2log\Writer');
+ $writer->expects($this->at(0))
+ ->method('write')
+ ->with('message', 'prefix');
+ $writer->expects($this->at(1))
+ ->method('close');
+
+ $this->fixture = new Udp2logHandler('');
+ $this->fixture->setFormatter(
+ new \Monolog\Formatter\LineFormatter('%message%')
+ );
+ // Inject our mock writer
+ $this->setProp($this->fixture, 'writer', $writer);
+ $this->setProp($this->fixture, 'prefix', 'prefix');
+
+ $this->fixture->handle($this->getRecord('message'));
+ $this->fixture->close();
+ }
+
+ /**
+ * @expectedException \UnexpectedValueException
+ * @expectedExceptionMessage could not be opened
+ * @covers ::__construct
+ * @covers ::errorTrap
+ * @covers ::openSink
+ * @covers ::write
+ * @uses \Monolog\Handler\Udp2log\StreamWriter
+ */
+ public function testReadOnlyFileThrows()
+ {
+ $fh = fopen($this->tmpFile, 'w');
+ fwrite($fh, '');
+ fclose($fh);
+ chmod($this->tmpFile, 0444);
+
+ $this->fixture = new Udp2logHandler($this->tmpFile);
+ $this->fixture->handle($this->getRecord('message'));
+ }
+}
diff --git a/vendor/bd808/monolog-udp2log-handler/tests/bootstrap.php
b/vendor/bd808/monolog-udp2log-handler/tests/bootstrap.php
new file mode 100644
index 0000000..a86d4f7
--- /dev/null
+++ b/vendor/bd808/monolog-udp2log-handler/tests/bootstrap.php
@@ -0,0 +1,4 @@
+<?php
+$loader = require __DIR__ . '/../vendor/autoload.php';
+$loader->addPsr4('Monolog\\Handler\\', __DIR__);
+date_default_timezone_set('UTC');
diff --git a/vendor/composer/autoload_classmap.php
b/vendor/composer/autoload_classmap.php
index eb86b42..23ab413 100644
--- a/vendor/composer/autoload_classmap.php
+++ b/vendor/composer/autoload_classmap.php
@@ -68,6 +68,10 @@
'Monolog\\Handler\\SyslogUdpHandler' => $vendorDir .
'/monolog/monolog/src/Monolog/Handler/SyslogUdpHandler.php',
'Monolog\\Handler\\SyslogUdp\\UdpSocket' => $vendorDir .
'/monolog/monolog/src/Monolog/Handler/SyslogUdp/UdpSocket.php',
'Monolog\\Handler\\TestHandler' => $vendorDir .
'/monolog/monolog/src/Monolog/Handler/TestHandler.php',
+ 'Monolog\\Handler\\Udp2logHandler' => $vendorDir .
'/bd808/monolog-udp2log-handler/src/Udp2logHandler.php',
+ 'Monolog\\Handler\\Udp2log\\StreamWriter' => $vendorDir .
'/bd808/monolog-udp2log-handler/src/Udp2log/StreamWriter.php',
+ 'Monolog\\Handler\\Udp2log\\UdpWriter' => $vendorDir .
'/bd808/monolog-udp2log-handler/src/Udp2log/UdpWriter.php',
+ 'Monolog\\Handler\\Udp2log\\Writer' => $vendorDir .
'/bd808/monolog-udp2log-handler/src/Udp2log/Writer.php',
'Monolog\\Handler\\WhatFailureGroupHandler' => $vendorDir .
'/monolog/monolog/src/Monolog/Handler/WhatFailureGroupHandler.php',
'Monolog\\Handler\\ZendMonitorHandler' => $vendorDir .
'/monolog/monolog/src/Monolog/Handler/ZendMonitorHandler.php',
'Monolog\\Logger' => $vendorDir .
'/monolog/monolog/src/Monolog/Logger.php',
@@ -311,7 +315,6 @@
'Wikimania\\Scholarship\\HeaderMiddleware' => $baseDir .
'/src/Wikimania/Scholarship/HeaderMiddleware.php',
'Wikimania\\Scholarship\\Lang' => $baseDir .
'/src/Wikimania/Scholarship/Lang.php',
'Wikimania\\Scholarship\\Mailer' => $baseDir .
'/src/Wikimania/Scholarship/Mailer.php',
- 'Wikimania\\Scholarship\\MwLogHandler' => $baseDir .
'/src/Wikimania/Scholarship/MwLogHandler.php',
'Wikimania\\Scholarship\\Password' => $baseDir .
'/src/Wikimania/Scholarship/Password.php',
'Wikimania\\Scholarship\\TwigExtension' => $baseDir .
'/src/Wikimania/Scholarship/TwigExtension.php',
'Wikimania\\Scholarship\\Wikis' => $baseDir .
'/src/Wikimania/Scholarship/Wikis.php',
diff --git a/vendor/composer/autoload_psr4.php
b/vendor/composer/autoload_psr4.php
index 97bc5b2..4814356 100644
--- a/vendor/composer/autoload_psr4.php
+++ b/vendor/composer/autoload_psr4.php
@@ -6,5 +6,6 @@
$baseDir = dirname($vendorDir);
return array(
+ 'Monolog\\Handler\\' => array($vendorDir .
'/bd808/monolog-udp2log-handler/src'),
'Monolog\\' => array($vendorDir . '/monolog/monolog/src/Monolog'),
);
diff --git a/vendor/composer/autoload_real.php
b/vendor/composer/autoload_real.php
index 5bd895e..895a76c 100644
--- a/vendor/composer/autoload_real.php
+++ b/vendor/composer/autoload_real.php
@@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
-class ComposerAutoloaderInit2564ffb18f36cd909cec686b12a0766f
+class ComposerAutoloaderInitbfcb8b0812b2c1bc79a08faa1d621831
{
private static $loader;
@@ -19,9 +19,9 @@
return self::$loader;
}
-
spl_autoload_register(array('ComposerAutoloaderInit2564ffb18f36cd909cec686b12a0766f',
'loadClassLoader'), true, true);
+
spl_autoload_register(array('ComposerAutoloaderInitbfcb8b0812b2c1bc79a08faa1d621831',
'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
-
spl_autoload_unregister(array('ComposerAutoloaderInit2564ffb18f36cd909cec686b12a0766f',
'loadClassLoader'));
+
spl_autoload_unregister(array('ComposerAutoloaderInitbfcb8b0812b2c1bc79a08faa1d621831',
'loadClassLoader'));
$map = require __DIR__ . '/autoload_namespaces.php';
foreach ($map as $namespace => $path) {
@@ -44,7 +44,7 @@
}
}
-function composerRequire2564ffb18f36cd909cec686b12a0766f($file)
+function composerRequirebfcb8b0812b2c1bc79a08faa1d621831($file)
{
require $file;
}
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index 849ee9d..ba8d5ec 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -330,5 +330,55 @@
"keywords": [
"templating"
]
+ },
+ {
+ "name": "bd808/monolog-udp2log-handler",
+ "version": "v1.0.0",
+ "version_normalized": "1.0.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/bd808/udp2log-monolog-handler.git",
+ "reference": "9cef81fda240a651c3b934fb24b9ea48a4824e1b"
+ },
+ "dist": {
+ "type": "zip",
+ "url":
"https://api.github.com/repos/bd808/udp2log-monolog-handler/zipball/9cef81fda240a651c3b934fb24b9ea48a4824e1b",
+ "reference": "9cef81fda240a651c3b934fb24b9ea48a4824e1b",
+ "shasum": ""
+ },
+ "require": {
+ "monolog/monolog": "~1.6",
+ "php": ">=5.3.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.0"
+ },
+ "time": "2014-09-14 17:15:23",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Monolog\\Handler\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Bryan Davis",
+ "homepage": "http://bd808.com",
+ "role": "Developer"
+ }
+ ],
+ "description": "A handler for Monolog that emits udp2log datagrams.",
+ "homepage": "https://github.com/bd808/monolog-udp2log-handler",
+ "keywords": [
+ "log",
+ "mediawiki",
+ "monolog",
+ "udp2log"
+ ]
}
]
--
To view, visit https://gerrit.wikimedia.org/r/178077
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4d67465fff57068e18b967fe6e32881d855a82a4
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/wikimania-scholarships
Gerrit-Branch: master
Gerrit-Owner: BryanDavis <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits