Verified Commit 7c61fc84 authored by Ingo Pfennigstorf's avatar Ingo Pfennigstorf 💅
Browse files

Add Graylog

parent ec20ec7c
Pipeline #8782 passed with stage
in 1 minute and 41 seconds
......@@ -20,3 +20,6 @@ S3_STORAGE_SECRET=t3gwdg
INDEXER_DOMAIN=http://api.t3.org
###< app ###
LOG_HOST=logging.example.com
LOG_PORT=7946
......@@ -5,6 +5,7 @@
"license": "AGPL-3.0-or-later",
"require": {
"php": "^7.1",
"graylog2/gelf-php": "^1.5",
"guzzlehttp/guzzle": "^6.3",
"league/flysystem-aws-s3-v3": "^1.0",
"league/flysystem-sftp": "^1.0",
......
......@@ -4,20 +4,20 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"content-hash": "03e036162f4878c1a3f87093b4b44b0c",
"content-hash": "d59025d6267c26ae2c14b5be32903b73",
"packages": [
{
"name": "aws/aws-sdk-php",
"version": "3.52.3",
"version": "3.52.7",
"source": {
"type": "git",
"url": "https://github.com/aws/aws-sdk-php.git",
"reference": "c6fa9217f1ff1cbfd8c498bb6deff5f342615717"
"reference": "4abee976c5884b1bc376b8388dd1ac53b4643bb6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/c6fa9217f1ff1cbfd8c498bb6deff5f342615717",
"reference": "c6fa9217f1ff1cbfd8c498bb6deff5f342615717",
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/4abee976c5884b1bc376b8388dd1ac53b4643bb6",
"reference": "4abee976c5884b1bc376b8388dd1ac53b4643bb6",
"shasum": ""
},
"require": {
......@@ -84,7 +84,7 @@
"s3",
"sdk"
],
"time": "2018-02-05T21:14:16+00:00"
"time": "2018-02-12T21:48:20+00:00"
},
{
"name": "doctrine/instantiator",
......@@ -140,6 +140,62 @@
],
"time": "2017-07-22T11:58:36+00:00"
},
{
"name": "graylog2/gelf-php",
"version": "1.5.5",
"source": {
"type": "git",
"url": "https://github.com/bzikarsky/gelf-php.git",
"reference": "c4e0743ba323459b6e62222107a0898e77d2fd6e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/bzikarsky/gelf-php/zipball/c4e0743ba323459b6e62222107a0898e77d2fd6e",
"reference": "c4e0743ba323459b6e62222107a0898e77d2fd6e",
"shasum": ""
},
"require": {
"php": ">=5.3.9",
"psr/log": "~1.0"
},
"provide": {
"psr/log-implementation": "~1.0"
},
"require-dev": {
"phpunit/phpunit": "~4.3",
"squizlabs/php_codesniffer": "~2.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.4.x-dev"
}
},
"autoload": {
"psr-4": {
"Gelf\\": "src/Gelf"
},
"files": [
"src/check_technical_requirements.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Benjamin Zikarsky",
"email": "benjamin@zikarsky.de"
},
{
"name": "gelf-php contributors",
"homepage": "https://github.com/bzikarsky/gelf-php/contributors"
}
],
"description": "A php implementation to send log-messages to a GELF compatible backend like Graylog2.",
"time": "2017-06-24T10:38:25+00:00"
},
{
"name": "guzzlehttp/guzzle",
"version": "6.3.0",
......@@ -1113,16 +1169,16 @@
},
{
"name": "phpspec/prophecy",
"version": "1.7.3",
"version": "1.7.4",
"source": {
"type": "git",
"url": "https://github.com/phpspec/prophecy.git",
"reference": "e4ed002c67da8eceb0eb8ddb8b3847bb53c5c2bf"
"reference": "9f901e29c93dae4aa77c0bb161df4276f9c9a1be"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/e4ed002c67da8eceb0eb8ddb8b3847bb53c5c2bf",
"reference": "e4ed002c67da8eceb0eb8ddb8b3847bb53c5c2bf",
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/9f901e29c93dae4aa77c0bb161df4276f9c9a1be",
"reference": "9f901e29c93dae4aa77c0bb161df4276f9c9a1be",
"shasum": ""
},
"require": {
......@@ -1134,7 +1190,7 @@
},
"require-dev": {
"phpspec/phpspec": "^2.5|^3.2",
"phpunit/phpunit": "^4.8.35 || ^5.7"
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5"
},
"type": "library",
"extra": {
......@@ -1172,7 +1228,7 @@
"spy",
"stub"
],
"time": "2017-11-24T13:59:53+00:00"
"time": "2018-02-11T18:49:29+00:00"
},
{
"name": "phpunit/php-code-coverage",
......
monolog:
handlers:
main:
type: fingers_crossed
action_level: error
handler: nested
nested:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: debug
console:
type: console
process_psr_3_messages: false
channels: ["!event", "!doctrine"]
type: fingers_crossed
level: info
handler: gelf
gelf:
type: service
id: monolog.gelf_handler
level: debug
......@@ -50,3 +50,18 @@ services:
class: App\Service\NotificationService
arguments: ["%env(INDEXER_DOMAIN)%"]
public: true
monolog.gelf_handler:
class: Monolog\Handler\GelfHandler
arguments: ["@gelf.publisher", 100]
gelf.validator:
class: Gelf\MessageValidator
gelf.transport:
class: Gelf\Transport\UdpTransport
arguments: ['%env(LOG_DOMAIN)%', '%env(LOG_PORT)%']
gelf.publisher:
class: Gelf\Publisher
arguments: ["@gelf.transport", "@gelf.validator"]
......@@ -84,7 +84,7 @@ class CheckNewFiles extends ContainerAwareCommand
$isImageCopied = $this->copyService->copyTiff($sourceFilesystem->read($image['path']), $image['basename'], $identifier);
if ($isImageCopied) {
$sourceFilesystem->delete($image['path']);
$this->logger->debug(sprintf('Image %s from %s deleted', $image['path'], $identifier), $image);
$this->logger->debug(sprintf('Deleted image %s from %s', $image['path'], $identifier), $image);
}
}
......
......@@ -5,6 +5,9 @@
"doctrine/instantiator": {
"version": "1.1.0"
},
"graylog2/gelf-php": {
"version": "1.5.5"
},
"guzzlehttp/guzzle": {
"version": "6.3.0"
},
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment