From ed7a8f336fe5ebae7c4c02e0f714284f10327364 Mon Sep 17 00:00:00 2001
From: Domink Sigmund <sigmund.dominik@googlemail.com>
Date: Fri, 28 Sep 2018 10:21:53 +0200
Subject: [PATCH] Graylog Support into a new Branch

---
 README.md    |  8 +-------
 index.js     | 32 --------------------------------
 package.json |  1 -
 3 files changed, 1 insertion(+), 40 deletions(-)

diff --git a/README.md b/README.md
index b196ff7..78ee80d 100644
--- a/README.md
+++ b/README.md
@@ -29,12 +29,6 @@ Note: The options Part may be omitted, as all parts are optional, but using the
 {
   name: 'Name of App. Default: Name of BaseFolder',
   hostname: 'Server Hostname, Default: os.hostname()',
-  file: 'File to Append Log to',
-  graylog: [
-    {
-      server: 'graylog-server',
-      port: 'graylog-port'
-    }
-  ]
+  file: 'File to Append Log to'
 }
 ```
\ No newline at end of file
diff --git a/index.js b/index.js
index fa4e4a6..5de346d 100644
--- a/index.js
+++ b/index.js
@@ -14,14 +14,6 @@ function Log (options) {
   if (this.options.file) {
     this.fs = require('fs')
   }
-  if (this.options.graylog) {
-    this.graylog2 = require('graylog2')
-    this.graylogger = new this.graylog2.graylog({ // eslint-disable-line new-cap
-      servers: this.options.graylog,
-      hostname: this.hostname,
-      facility: this.name
-    })
-  }
   this.info = function (message) {
     this.log('INFO', message)
   }
@@ -71,30 +63,6 @@ function Log (options) {
         }
       })
     }
-    if (this.options.graylog) {
-      switch (tag) {
-        case 'INFO':
-          this.graylogger.info(message)
-          break
-        case 'NOTICE':
-          this.graylogger.notice(message)
-          break
-        case 'WARN':
-          this.graylogger.warning(message)
-          break
-        case 'ERROR':
-          this.graylogger.error(message)
-          break
-        case 'FATAL':
-          this.graylogger.critical(message)
-          break
-        case 'DEBUG':
-          this.graylogger.debug(message)
-          break
-        default:
-          this.graylogger.notice(message)
-      }
-    }
   }
   this.getDate = function () {
     var tzoffset = (new Date()).getTimezoneOffset() * 60000 // offset in milliseconds
diff --git a/package.json b/package.json
index 43f3dd9..0f663d8 100644
--- a/package.json
+++ b/package.json
@@ -9,6 +9,5 @@
   "author": "Dominik Sigmund",
   "license": "ISC",
   "dependencies": {
-    "graylog2": "^0.2.1"
   }
 }
-- 
GitLab