Browse Source

add monolog bundle && composer update && improve deploy script #1

Laszlo Lang 2 weeks ago
parent
commit
4d59ada602

+ 1
- 0
composer.json View File

@@ -15,6 +15,7 @@
15 15
         "symfony/framework-bundle": "^4.1",
16 16
         "symfony/lts": "^4@dev",
17 17
         "symfony/maker-bundle": "^1.6",
18
+        "symfony/monolog-bundle": "^3.3",
18 19
         "symfony/orm-pack": "^1.0",
19 20
         "symfony/requirements-checker": "^1.1",
20 21
         "symfony/swiftmailer-bundle": "^3.2",

+ 210
- 2
composer.lock View File

@@ -4,8 +4,8 @@
4 4
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
5 5
         "This file is @generated automatically"
6 6
     ],
7
-    "hash": "e9e81316f12d36a0a96fde46b401d414",
8
-    "content-hash": "3e632adf058aa723329067e16cbe4d63",
7
+    "hash": "d25c65c6da1dfbd58f04efb5cf3fe37a",
8
+    "content-hash": "fc991cc345ba7306a681a024c1ebf2d4",
9 9
     "packages": [
10 10
         {
11 11
             "name": "cocur/slugify",
@@ -2053,6 +2053,84 @@
2053 2053
             "time": "2018-03-19 10:34:40"
2054 2054
         },
2055 2055
         {
2056
+            "name": "monolog/monolog",
2057
+            "version": "1.24.0",
2058
+            "source": {
2059
+                "type": "git",
2060
+                "url": "https://github.com/Seldaek/monolog.git",
2061
+                "reference": "bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266"
2062
+            },
2063
+            "dist": {
2064
+                "type": "zip",
2065
+                "url": "https://api.github.com/repos/Seldaek/monolog/zipball/bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266",
2066
+                "reference": "bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266",
2067
+                "shasum": ""
2068
+            },
2069
+            "require": {
2070
+                "php": ">=5.3.0",
2071
+                "psr/log": "~1.0"
2072
+            },
2073
+            "provide": {
2074
+                "psr/log-implementation": "1.0.0"
2075
+            },
2076
+            "require-dev": {
2077
+                "aws/aws-sdk-php": "^2.4.9 || ^3.0",
2078
+                "doctrine/couchdb": "~1.0@dev",
2079
+                "graylog2/gelf-php": "~1.0",
2080
+                "jakub-onderka/php-parallel-lint": "0.9",
2081
+                "php-amqplib/php-amqplib": "~2.4",
2082
+                "php-console/php-console": "^3.1.3",
2083
+                "phpunit/phpunit": "~4.5",
2084
+                "phpunit/phpunit-mock-objects": "2.3.0",
2085
+                "ruflin/elastica": ">=0.90 <3.0",
2086
+                "sentry/sentry": "^0.13",
2087
+                "swiftmailer/swiftmailer": "^5.3|^6.0"
2088
+            },
2089
+            "suggest": {
2090
+                "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB",
2091
+                "doctrine/couchdb": "Allow sending log messages to a CouchDB server",
2092
+                "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)",
2093
+                "ext-mongo": "Allow sending log messages to a MongoDB server",
2094
+                "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server",
2095
+                "mongodb/mongodb": "Allow sending log messages to a MongoDB server via PHP Driver",
2096
+                "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib",
2097
+                "php-console/php-console": "Allow sending log messages to Google Chrome",
2098
+                "rollbar/rollbar": "Allow sending log messages to Rollbar",
2099
+                "ruflin/elastica": "Allow sending log messages to an Elastic Search server",
2100
+                "sentry/sentry": "Allow sending log messages to a Sentry server"
2101
+            },
2102
+            "type": "library",
2103
+            "extra": {
2104
+                "branch-alias": {
2105
+                    "dev-master": "2.0.x-dev"
2106
+                }
2107
+            },
2108
+            "autoload": {
2109
+                "psr-4": {
2110
+                    "Monolog\\": "src/Monolog"
2111
+                }
2112
+            },
2113
+            "notification-url": "https://packagist.org/downloads/",
2114
+            "license": [
2115
+                "MIT"
2116
+            ],
2117
+            "authors": [
2118
+                {
2119
+                    "name": "Jordi Boggiano",
2120
+                    "email": "j.boggiano@seld.be",
2121
+                    "homepage": "http://seld.be"
2122
+                }
2123
+            ],
2124
+            "description": "Sends your logs to files, sockets, inboxes, databases and various web services",
2125
+            "homepage": "http://github.com/Seldaek/monolog",
2126
+            "keywords": [
2127
+                "log",
2128
+                "logging",
2129
+                "psr-3"
2130
+            ],
2131
+            "time": "2018-11-05 09:00:11"
2132
+        },
2133
+        {
2056 2134
             "name": "nikic/php-parser",
2057 2135
             "version": "v4.1.0",
2058 2136
             "source": {
@@ -4924,6 +5002,136 @@
4924 5002
             "time": "2018-10-13 19:56:32"
4925 5003
         },
4926 5004
         {
5005
+            "name": "symfony/monolog-bridge",
5006
+            "version": "v4.1.7",
5007
+            "source": {
5008
+                "type": "git",
5009
+                "url": "https://github.com/symfony/monolog-bridge.git",
5010
+                "reference": "858737f5ec0266ed37b6b687020283b6e78ae220"
5011
+            },
5012
+            "dist": {
5013
+                "type": "zip",
5014
+                "url": "https://api.github.com/repos/symfony/monolog-bridge/zipball/858737f5ec0266ed37b6b687020283b6e78ae220",
5015
+                "reference": "858737f5ec0266ed37b6b687020283b6e78ae220",
5016
+                "shasum": ""
5017
+            },
5018
+            "require": {
5019
+                "monolog/monolog": "~1.19",
5020
+                "php": "^7.1.3",
5021
+                "symfony/http-kernel": "~3.4|~4.0"
5022
+            },
5023
+            "conflict": {
5024
+                "symfony/console": "<3.4",
5025
+                "symfony/http-foundation": "<3.4"
5026
+            },
5027
+            "require-dev": {
5028
+                "symfony/console": "~3.4|~4.0",
5029
+                "symfony/event-dispatcher": "~3.4|~4.0",
5030
+                "symfony/security-core": "~3.4|~4.0",
5031
+                "symfony/var-dumper": "~3.4|~4.0"
5032
+            },
5033
+            "suggest": {
5034
+                "symfony/console": "For the possibility to show log messages in console commands depending on verbosity settings.",
5035
+                "symfony/event-dispatcher": "Needed when using log messages in console commands.",
5036
+                "symfony/http-kernel": "For using the debugging handlers together with the response life cycle of the HTTP kernel.",
5037
+                "symfony/var-dumper": "For using the debugging handlers like the console handler or the log server handler."
5038
+            },
5039
+            "type": "symfony-bridge",
5040
+            "extra": {
5041
+                "branch-alias": {
5042
+                    "dev-master": "4.1-dev"
5043
+                }
5044
+            },
5045
+            "autoload": {
5046
+                "psr-4": {
5047
+                    "Symfony\\Bridge\\Monolog\\": ""
5048
+                },
5049
+                "exclude-from-classmap": [
5050
+                    "/Tests/"
5051
+                ]
5052
+            },
5053
+            "notification-url": "https://packagist.org/downloads/",
5054
+            "license": [
5055
+                "MIT"
5056
+            ],
5057
+            "authors": [
5058
+                {
5059
+                    "name": "Fabien Potencier",
5060
+                    "email": "fabien@symfony.com"
5061
+                },
5062
+                {
5063
+                    "name": "Symfony Community",
5064
+                    "homepage": "https://symfony.com/contributors"
5065
+                }
5066
+            ],
5067
+            "description": "Symfony Monolog Bridge",
5068
+            "homepage": "https://symfony.com",
5069
+            "time": "2018-09-21 12:49:42"
5070
+        },
5071
+        {
5072
+            "name": "symfony/monolog-bundle",
5073
+            "version": "v3.3.1",
5074
+            "source": {
5075
+                "type": "git",
5076
+                "url": "https://github.com/symfony/monolog-bundle.git",
5077
+                "reference": "572e143afc03419a75ab002c80a2fd99299195ff"
5078
+            },
5079
+            "dist": {
5080
+                "type": "zip",
5081
+                "url": "https://api.github.com/repos/symfony/monolog-bundle/zipball/572e143afc03419a75ab002c80a2fd99299195ff",
5082
+                "reference": "572e143afc03419a75ab002c80a2fd99299195ff",
5083
+                "shasum": ""
5084
+            },
5085
+            "require": {
5086
+                "monolog/monolog": "~1.22",
5087
+                "php": ">=5.6",
5088
+                "symfony/config": "~2.7|~3.3|~4.0",
5089
+                "symfony/dependency-injection": "~2.7|~3.4.10|^4.0.10",
5090
+                "symfony/http-kernel": "~2.7|~3.3|~4.0",
5091
+                "symfony/monolog-bridge": "~2.7|~3.3|~4.0"
5092
+            },
5093
+            "require-dev": {
5094
+                "symfony/console": "~2.7|~3.3|~4.0",
5095
+                "symfony/phpunit-bridge": "^3.3|^4.0",
5096
+                "symfony/yaml": "~2.7|~3.3|~4.0"
5097
+            },
5098
+            "type": "symfony-bundle",
5099
+            "extra": {
5100
+                "branch-alias": {
5101
+                    "dev-master": "3.x-dev"
5102
+                }
5103
+            },
5104
+            "autoload": {
5105
+                "psr-4": {
5106
+                    "Symfony\\Bundle\\MonologBundle\\": ""
5107
+                },
5108
+                "exclude-from-classmap": [
5109
+                    "/Tests/"
5110
+                ]
5111
+            },
5112
+            "notification-url": "https://packagist.org/downloads/",
5113
+            "license": [
5114
+                "MIT"
5115
+            ],
5116
+            "authors": [
5117
+                {
5118
+                    "name": "Symfony Community",
5119
+                    "homepage": "http://symfony.com/contributors"
5120
+                },
5121
+                {
5122
+                    "name": "Fabien Potencier",
5123
+                    "email": "fabien@symfony.com"
5124
+                }
5125
+            ],
5126
+            "description": "Symfony MonologBundle",
5127
+            "homepage": "http://symfony.com",
5128
+            "keywords": [
5129
+                "log",
5130
+                "logging"
5131
+            ],
5132
+            "time": "2018-11-04 09:58:13"
5133
+        },
5134
+        {
4927 5135
             "name": "symfony/options-resolver",
4928 5136
             "version": "v4.1.6",
4929 5137
             "source": {

+ 1
- 0
config/bundles.php View File

@@ -23,4 +23,5 @@ return [
23 23
     JMS\SerializerBundle\JMSSerializerBundle::class => ['all' => true],
24 24
     Sonata\MediaBundle\SonataMediaBundle::class => ['all' => true],
25 25
     App\Application\Sonata\MediaBundle\ApplicationSonataMediaBundle::class => ['all' => true],
26
+    Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],
26 27
 ];

+ 19
- 0
config/packages/dev/monolog.yaml View File

@@ -0,0 +1,19 @@
1
+monolog:
2
+    handlers:
3
+        main:
4
+            type: stream
5
+            path: "%kernel.logs_dir%/%kernel.environment%.log"
6
+            level: debug
7
+            channels: ["!event"]
8
+        # uncomment to get logging in your browser
9
+        # you may have to allow bigger header sizes in your Web server configuration
10
+        #firephp:
11
+        #    type: firephp
12
+        #    level: info
13
+        #chromephp:
14
+        #    type: chromephp
15
+        #    level: info
16
+        console:
17
+            type: console
18
+            process_psr_3_messages: false
19
+            channels: ["!event", "!doctrine", "!console"]

+ 25
- 0
config/packages/prod/monolog.yaml View File

@@ -0,0 +1,25 @@
1
+monolog:
2
+    handlers:
3
+        main:
4
+            type: fingers_crossed
5
+            action_level: error
6
+            handler: nested
7
+            excluded_404s:
8
+                # regex: exclude all 404 errors from the logs
9
+                - ^/
10
+        nested:
11
+            type: stream
12
+            path: "%kernel.logs_dir%/%kernel.environment%.log"
13
+            level: debug
14
+        console:
15
+            type: console
16
+            process_psr_3_messages: false
17
+            channels: ["!event", "!doctrine"]
18
+        deprecation:
19
+            type: stream
20
+            path: "%kernel.logs_dir%/%kernel.environment%.deprecations.log"
21
+        deprecation_filter:
22
+            type: filter
23
+            handler: deprecation
24
+            max_level: info
25
+            channels: ["php"]

+ 7
- 0
config/packages/test/monolog.yaml View File

@@ -0,0 +1,7 @@
1
+monolog:
2
+    handlers:
3
+        main:
4
+            type: stream
5
+            path: "%kernel.logs_dir%/%kernel.environment%.log"
6
+            level: debug
7
+            channels: ["!event"]

+ 3
- 0
deploy.sh View File

@@ -9,6 +9,9 @@ bash ../versioning.sh
9 9
 rm -rf ../+prod/splendidbear/{assets,bin,config,public,src,templates,translations,vendor,composer.*,package.json,symfony.lock,webpack.config.js,yarn.lock}
10 10
 cp -r {assets,bin,config,public,src,templates,translations,vendor,composer.*,package.json,symfony.lock,webpack.config.js,yarn.lock,.htpasswd} ../+prod/splendidbear/
11 11
 
12
+sudo setfacl -R -m u:www-data:rwx -m u:system7:rwx public/upload
13
+sudo setfacl -dR -m u:www-data:rwx -m u:system7:rwx public/upload
14
+
12 15
 cd ../+prod/splendidbear
13 16
 bash install.sh
14 17
 cd ../../splendidbear

+ 15
- 0
symfony.lock View File

@@ -113,6 +113,9 @@
113 113
     "kriswallsmith/buzz": {
114 114
         "version": "v0.16.1"
115 115
     },
116
+    "monolog/monolog": {
117
+        "version": "1.24.0"
118
+    },
116 119
     "nikic/php-parser": {
117 120
         "version": "v4.0.3"
118 121
     },
@@ -287,6 +290,18 @@
287 290
             "ref": "fadbfe33303a76e25cb63401050439aa9b1a9c7f"
288 291
         }
289 292
     },
293
+    "symfony/monolog-bridge": {
294
+        "version": "v4.1.7"
295
+    },
296
+    "symfony/monolog-bundle": {
297
+        "version": "3.1",
298
+        "recipe": {
299
+            "repo": "github.com/symfony/recipes",
300
+            "branch": "master",
301
+            "version": "3.1",
302
+            "ref": "18ebf5a940573a20de06f9c4060101eeb438cf3d"
303
+        }
304
+    },
290 305
     "symfony/options-resolver": {
291 306
         "version": "v4.1.3"
292 307
     },