diff --git a/composer.json b/composer.json index 67ad11c..b97c3f2 100644 --- a/composer.json +++ b/composer.json @@ -43,6 +43,7 @@ "symfony/dotenv": "^5.2", "symfony/flex": "^1.11.0", "symfony/framework-bundle": "^5.2", + "symfony/monolog-bundle": "^3.7", "symfony/string": "^5.2", "symfony/yaml": "^5.2" }, diff --git a/composer.lock b/composer.lock index ec2da55..89951f9 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "9af578bfcf08feb61a0869d93e961079", + "content-hash": "7b0e874c4a83c629f45a97151a4607aa", "packages": [ { "name": "bentools/psr7-request-matcher", @@ -475,6 +475,102 @@ ], "time": "2020-08-20T13:22:28+00:00" }, + { + "name": "monolog/monolog", + "version": "2.3.2", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/monolog.git", + "reference": "71312564759a7db5b789296369c1a264efc43aad" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/71312564759a7db5b789296369c1a264efc43aad", + "reference": "71312564759a7db5b789296369c1a264efc43aad", + "shasum": "" + }, + "require": { + "php": ">=7.2", + "psr/log": "^1.0.1" + }, + "provide": { + "psr/log-implementation": "1.0.0" + }, + "require-dev": { + "aws/aws-sdk-php": "^2.4.9 || ^3.0", + "doctrine/couchdb": "~1.0@dev", + "elasticsearch/elasticsearch": "^7", + "graylog2/gelf-php": "^1.4.2", + "mongodb/mongodb": "^1.8", + "php-amqplib/php-amqplib": "~2.4", + "php-console/php-console": "^3.1.3", + "phpspec/prophecy": "^1.6.1", + "phpstan/phpstan": "^0.12.91", + "phpunit/phpunit": "^8.5", + "predis/predis": "^1.1", + "rollbar/rollbar": "^1.3", + "ruflin/elastica": ">=0.90 <7.0.1", + "swiftmailer/swiftmailer": "^5.3|^6.0" + }, + "suggest": { + "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", + "doctrine/couchdb": "Allow sending log messages to a CouchDB server", + "elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client", + "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", + "ext-mbstring": "Allow to work properly with unicode symbols", + "ext-mongodb": "Allow sending log messages to a MongoDB server (via driver)", + "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", + "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)", + "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", + "php-console/php-console": "Allow sending log messages to Google Chrome", + "rollbar/rollbar": "Allow sending log messages to Rollbar", + "ruflin/elastica": "Allow sending log messages to an Elastic Search server" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Monolog\\": "src/Monolog" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "https://seld.be" + } + ], + "description": "Sends your logs to files, sockets, inboxes, databases and various web services", + "homepage": "https://github.com/Seldaek/monolog", + "keywords": [ + "log", + "logging", + "psr-3" + ], + "support": { + "issues": "https://github.com/Seldaek/monolog/issues", + "source": "https://github.com/Seldaek/monolog/tree/2.3.2" + }, + "funding": [ + { + "url": "https://github.com/Seldaek", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/monolog/monolog", + "type": "tidelift" + } + ], + "time": "2021-07-23T07:42:52+00:00" + }, { "name": "predis/predis", "version": "v1.1.6", @@ -3202,6 +3298,170 @@ ], "time": "2020-12-18T13:49:39+00:00" }, + { + "name": "symfony/monolog-bridge", + "version": "v5.2.12", + "source": { + "type": "git", + "url": "https://github.com/symfony/monolog-bridge.git", + "reference": "2c3943d7c0100983f9c0a82807555273353e3539" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/monolog-bridge/zipball/2c3943d7c0100983f9c0a82807555273353e3539", + "reference": "2c3943d7c0100983f9c0a82807555273353e3539", + "shasum": "" + }, + "require": { + "monolog/monolog": "^1.25.1|^2", + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", + "symfony/http-kernel": "^4.4|^5.0", + "symfony/polyfill-php80": "^1.16", + "symfony/service-contracts": "^1.1|^2" + }, + "conflict": { + "symfony/console": "<4.4", + "symfony/http-foundation": "<4.4" + }, + "require-dev": { + "symfony/console": "^4.4|^5.0", + "symfony/http-client": "^4.4|^5.0", + "symfony/mailer": "^4.4|^5.0", + "symfony/mime": "^4.4|^5.0", + "symfony/security-core": "^4.4|^5.0", + "symfony/var-dumper": "^4.4|^5.0" + }, + "suggest": { + "symfony/console": "For the possibility to show log messages in console commands depending on verbosity settings.", + "symfony/http-kernel": "For using the debugging handlers together with the response life cycle of the HTTP kernel.", + "symfony/var-dumper": "For using the debugging handlers like the console handler or the log server handler." + }, + "type": "symfony-bridge", + "autoload": { + "psr-4": { + "Symfony\\Bridge\\Monolog\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides integration for Monolog with various Symfony components", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/monolog-bridge/tree/v5.2.12" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-07-23T15:54:19+00:00" + }, + { + "name": "symfony/monolog-bundle", + "version": "v3.7.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/monolog-bundle.git", + "reference": "4054b2e940a25195ae15f0a49ab0c51718922eb4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/monolog-bundle/zipball/4054b2e940a25195ae15f0a49ab0c51718922eb4", + "reference": "4054b2e940a25195ae15f0a49ab0c51718922eb4", + "shasum": "" + }, + "require": { + "monolog/monolog": "~1.22 || ~2.0", + "php": ">=7.1.3", + "symfony/config": "~4.4 || ^5.0", + "symfony/dependency-injection": "^4.4 || ^5.0", + "symfony/http-kernel": "~4.4 || ^5.0", + "symfony/monolog-bridge": "~4.4 || ^5.0" + }, + "require-dev": { + "symfony/console": "~4.4 || ^5.0", + "symfony/phpunit-bridge": "^5.1", + "symfony/yaml": "~4.4 || ^5.0" + }, + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Bundle\\MonologBundle\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony MonologBundle", + "homepage": "https://symfony.com", + "keywords": [ + "log", + "logging" + ], + "support": { + "issues": "https://github.com/symfony/monolog-bundle/issues", + "source": "https://github.com/symfony/monolog-bundle/tree/v3.7.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-03-31T07:20:47+00:00" + }, { "name": "symfony/polyfill-ctype", "version": "v1.20.0", @@ -8017,5 +8277,5 @@ "platform-dev": { "ext-dom": "*" }, - "plugin-api-version": "2.0.0" + "plugin-api-version": "2.1.0" } diff --git a/config/bundles.php b/config/bundles.php index 49d3fb6..5b11b41 100644 --- a/config/bundles.php +++ b/config/bundles.php @@ -2,4 +2,5 @@ return [ Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true], + Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true], ]; diff --git a/config/packages/dev/monolog.yaml b/config/packages/dev/monolog.yaml new file mode 100644 index 0000000..689af35 --- /dev/null +++ b/config/packages/dev/monolog.yaml @@ -0,0 +1,12 @@ +monolog: + handlers: + main: + type: stream + path: "%kernel.logs_dir%/%kernel.environment%.log" + level: debug + channels: ["!event"] + buffer_size: 50 + console: + type: console + process_psr_3_messages: false + channels: ["!event", "!doctrine", "!console"] diff --git a/config/packages/prod/deprecations.yaml b/config/packages/prod/deprecations.yaml new file mode 100644 index 0000000..60026a1 --- /dev/null +++ b/config/packages/prod/deprecations.yaml @@ -0,0 +1,8 @@ +# As of Symfony 5.1, deprecations are logged in the dedicated "deprecation" channel when it exists +#monolog: +# channels: [deprecation] +# handlers: +# deprecation: +# type: stream +# channels: [deprecation] +# path: php://stderr diff --git a/config/packages/prod/monolog.yaml b/config/packages/prod/monolog.yaml new file mode 100644 index 0000000..a9af4eb --- /dev/null +++ b/config/packages/prod/monolog.yaml @@ -0,0 +1,7 @@ +monolog: + handlers: + main: + type: stream + path: "%kernel.logs_dir%/%kernel.environment%.log" + level: error + buffer_size: 50 \ No newline at end of file diff --git a/config/packages/test/monolog.yaml b/config/packages/test/monolog.yaml new file mode 100644 index 0000000..fc40641 --- /dev/null +++ b/config/packages/test/monolog.yaml @@ -0,0 +1,12 @@ +monolog: + handlers: + main: + type: fingers_crossed + action_level: error + handler: nested + excluded_http_codes: [404, 405] + channels: ["!event"] + nested: + type: stream + path: "%kernel.logs_dir%/%kernel.environment%.log" + level: debug diff --git a/symfony.lock b/symfony.lock index fe29ba0..edc7206 100644 --- a/symfony.lock +++ b/symfony.lock @@ -1,10 +1,285 @@ { + "bentools/cartesian-product": { + "version": "1.3.1" + }, + "bentools/iterable-functions": { + "version": "1.4" + }, + "bentools/psr7-request-matcher": { + "version": "1.1" + }, + "bentools/querystring": { + "version": "1.1" + }, + "bentools/shh": { + "version": "1.0" + }, + "brick/math": { + "version": "0.9.1" + }, + "clue/block-react": { + "version": "v1.4.0" + }, + "clue/reactphp-eventsource": { + "version": "dev-master" + }, + "clue/redis-protocol": { + "version": "v0.3.1" + }, + "clue/redis-react": { + "version": "v2.4.0" + }, + "composer/semver": { + "version": "3.2.4" + }, + "composer/xdebug-handler": { + "version": "1.4.5" + }, + "doctrine/annotations": { + "version": "1.0", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "master", + "version": "1.0", + "ref": "a2759dd6123694c8d901d0ec80006e044c2e6457" + }, + "files": [ + "config/routes/annotations.yaml" + ] + }, + "doctrine/instantiator": { + "version": "1.4.0" + }, + "doctrine/lexer": { + "version": "1.2.1" + }, + "evenement/evenement": { + "version": "v3.0.1" + }, + "facade/ignition-contracts": { + "version": "1.0.2" + }, + "filp/whoops": { + "version": "2.9.1" + }, + "friendsofphp/php-cs-fixer": { + "version": "2.17", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "master", + "version": "2.17", + "ref": "f0d4b4ddb4e2bb73b227e3987b6ecc53cd8be431" + }, + "files": [ + ".php_cs.dist" + ] + }, + "lcobucci/jwt": { + "version": "3.3.3" + }, + "monolog/monolog": { + "version": "2.3.2" + }, + "myclabs/deep-copy": { + "version": "1.10.2" + }, + "nikic/php-parser": { + "version": "v4.10.4" + }, + "nunomaduro/collision": { + "version": "v5.1.0" + }, + "pestphp/pest": { + "version": "v0.3.19" + }, + "pestphp/pest-plugin-coverage": { + "version": "v0.3.0" + }, + "pestphp/pest-plugin-expectations": { + "version": "v0.3.3" + }, + "pestphp/pest-plugin-init": { + "version": "v0.3.1" + }, + "phar-io/manifest": { + "version": "2.0.1" + }, + "phar-io/version": { + "version": "3.0.4" + }, "php": { "version": "7.4" }, + "php-cs-fixer/diff": { + "version": "v1.3.1" + }, + "phpdocumentor/reflection-common": { + "version": "2.2.0" + }, + "phpdocumentor/reflection-docblock": { + "version": "5.2.2" + }, + "phpdocumentor/type-resolver": { + "version": "1.4.0" + }, + "phpspec/prophecy": { + "version": "1.12.2" + }, + "phpstan/phpstan": { + "version": "0.12.64" + }, + "phpunit/php-code-coverage": { + "version": "9.2.5" + }, + "phpunit/php-file-iterator": { + "version": "3.0.5" + }, + "phpunit/php-invoker": { + "version": "3.1.1" + }, + "phpunit/php-text-template": { + "version": "2.0.4" + }, + "phpunit/php-timer": { + "version": "5.0.3" + }, + "phpunit/phpunit": { + "version": "9.3", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "master", + "version": "9.3", + "ref": "a6249a6c4392e9169b87abf93225f7f9f59025e6" + }, + "files": [ + ".env.test", + "phpunit.xml.dist", + "tests/bootstrap.php" + ] + }, + "predis/predis": { + "version": "v1.1.6" + }, "psr/cache": { "version": "1.0.1" }, + "psr/container": { + "version": "1.0.0" + }, + "psr/event-dispatcher": { + "version": "1.0.0" + }, + "psr/http-message": { + "version": "1.0.1" + }, + "psr/http-server-handler": { + "version": "1.0.1" + }, + "psr/http-server-middleware": { + "version": "1.0.1" + }, + "psr/log": { + "version": "1.1.3" + }, + "ramsey/collection": { + "version": "1.1.1" + }, + "ramsey/uuid": { + "version": "4.1.1" + }, + "react/cache": { + "version": "v1.1.0" + }, + "react/dns": { + "version": "v1.4.0" + }, + "react/event-loop": { + "version": "v1.1.1" + }, + "react/http": { + "version": "v1.2.0" + }, + "react/promise": { + "version": "v2.8.0" + }, + "react/promise-stream": { + "version": "v1.2.0" + }, + "react/promise-timer": { + "version": "v1.6.0" + }, + "react/socket": { + "version": "v1.6.0" + }, + "react/stream": { + "version": "v1.1.1" + }, + "ringcentral/psr7": { + "version": "1.3.0" + }, + "rize/uri-template": { + "version": "0.3.2" + }, + "sebastian/cli-parser": { + "version": "1.0.1" + }, + "sebastian/code-unit": { + "version": "1.0.8" + }, + "sebastian/code-unit-reverse-lookup": { + "version": "2.0.3" + }, + "sebastian/comparator": { + "version": "4.0.6" + }, + "sebastian/complexity": { + "version": "2.0.2" + }, + "sebastian/diff": { + "version": "4.0.4" + }, + "sebastian/environment": { + "version": "5.1.3" + }, + "sebastian/exporter": { + "version": "4.0.3" + }, + "sebastian/global-state": { + "version": "5.0.2" + }, + "sebastian/lines-of-code": { + "version": "1.0.3" + }, + "sebastian/object-enumerator": { + "version": "4.0.4" + }, + "sebastian/object-reflector": { + "version": "2.0.4" + }, + "sebastian/recursion-context": { + "version": "4.0.4" + }, + "sebastian/resource-operations": { + "version": "3.0.3" + }, + "sebastian/type": { + "version": "2.3.1" + }, + "sebastian/version": { + "version": "3.0.2" + }, + "squizlabs/php_codesniffer": { + "version": "3.0", + "recipe": { + "repo": "github.com/symfony/recipes-contrib", + "branch": "master", + "version": "3.0", + "ref": "0dc9cceda799fd3a08b96987e176a261028a3709" + }, + "files": [ + "phpcs.xml.dist" + ] + }, "symfony/cache": { "version": "v5.1.5" }, @@ -14,15 +289,42 @@ "symfony/config": { "version": "v5.1.5" }, + "symfony/console": { + "version": "5.1", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "master", + "version": "5.1", + "ref": "c6d02bdfba9da13c22157520e32a602dbee8a75c" + }, + "files": [ + "bin/console" + ] + }, "symfony/dependency-injection": { "version": "v5.1.5" }, + "symfony/deprecation-contracts": { + "version": "v2.2.0" + }, "symfony/dotenv": { "version": "v5.1.5" }, "symfony/error-handler": { "version": "v5.1.5" }, + "symfony/event-dispatcher": { + "version": "v5.2.1" + }, + "symfony/event-dispatcher-contracts": { + "version": "v2.2.0" + }, + "symfony/filesystem": { + "version": "v5.2.1" + }, + "symfony/finder": { + "version": "v5.2.1" + }, "symfony/flex": { "version": "1.0", "recipe": { @@ -54,12 +356,66 @@ "src/Kernel.php" ] }, + "symfony/http-client": { + "version": "v5.2.1" + }, + "symfony/http-client-contracts": { + "version": "v2.3.1" + }, "symfony/http-foundation": { "version": "v5.1.5" }, "symfony/http-kernel": { "version": "v5.1.5" }, + "symfony/monolog-bridge": { + "version": "v5.2.12" + }, + "symfony/monolog-bundle": { + "version": "3.7", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "master", + "version": "3.7", + "ref": "a7bace7dbc5a7ed5608dbe2165e0774c87175fe6" + }, + "files": [ + "config/packages/dev/monolog.yaml", + "config/packages/prod/deprecations.yaml", + "config/packages/prod/monolog.yaml", + "config/packages/test/monolog.yaml" + ] + }, + "symfony/options-resolver": { + "version": "v5.2.1" + }, + "symfony/polyfill-ctype": { + "version": "v1.20.0" + }, + "symfony/polyfill-intl-grapheme": { + "version": "v1.20.0" + }, + "symfony/polyfill-intl-normalizer": { + "version": "v1.20.0" + }, + "symfony/polyfill-mbstring": { + "version": "v1.20.0" + }, + "symfony/polyfill-php70": { + "version": "v1.20.0" + }, + "symfony/polyfill-php72": { + "version": "v1.20.0" + }, + "symfony/polyfill-php73": { + "version": "v1.20.0" + }, + "symfony/polyfill-php80": { + "version": "v1.20.0" + }, + "symfony/process": { + "version": "v5.2.1" + }, "symfony/routing": { "version": "5.1", "recipe": { @@ -74,10 +430,28 @@ "config/routes.yaml" ] }, + "symfony/service-contracts": { + "version": "v2.2.0" + }, + "symfony/stopwatch": { + "version": "v5.2.1" + }, + "symfony/string": { + "version": "v5.2.1" + }, + "symfony/var-dumper": { + "version": "v5.2.1" + }, "symfony/var-exporter": { "version": "v5.1.5" }, "symfony/yaml": { "version": "v5.1.5" + }, + "theseer/tokenizer": { + "version": "1.2.0" + }, + "webmozart/assert": { + "version": "1.9.1" } }