{"action":"created","comment":{"url":"https://api.github.com/repos/namshi/winston-graylog2/pulls/comments/213922889","pull_request_review_id":150860555,"id":213922889,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMzkyMjg4OQ==","diff_hunk":"@@ -79,12 +80,22 @@ let Graylog2 = (winston.transports.Graylog2 = function(options) {\n   this.name = options.name || 'graylog2';\n   this.silent = options.silent || false;\n   this.handleExceptions = options.handleExceptions || false;\n-  this.prelog =\n-    typeof options.prelog === 'function' ? options.prelog : _.identity;\n+  this.json = options.json || false;\n+  this.colorize = options.colorize || false;\n+  this.label = options.label || null;\n+  this.prettyPrint = options.prettyPrint || false;\n+  this.timestamp = options.timestamp || true;\n+  this.logstash = options.logstash || null;\n+  this.depth = options.depth || null;\n+  this.showLevel = options.showLevel === undefined ? true : options.showLevel;","path":"lib/winston-graylog2.js","position":null,"original_position":21,"commit_id":"6fb576b3b436fa9c8368d1fa084a75359c8d8d8d","original_commit_id":"3d5446204d7eb5c462dfd8d1bac013088232dc0c","user":{"login":"schfkt","id":3599143,"node_id":"MDQ6VXNlcjM1OTkxNDM=","avatar_url":"https://avatars0.githubusercontent.com/u/3599143?v=4","gravatar_id":"","url":"https://api.github.com/users/schfkt","html_url":"https://github.com/schfkt","followers_url":"https://api.github.com/users/schfkt/followers","following_url":"https://api.github.com/users/schfkt/following{/other_user}","gists_url":"https://api.github.com/users/schfkt/gists{/gist_id}","starred_url":"https://api.github.com/users/schfkt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schfkt/subscriptions","organizations_url":"https://api.github.com/users/schfkt/orgs","repos_url":"https://api.github.com/users/schfkt/repos","events_url":"https://api.github.com/users/schfkt/events{/privacy}","received_events_url":"https://api.github.com/users/schfkt/received_events","type":"User","site_admin":false},"body":"@surbhi-mahajan \r\n\r\n> timestamp\r\n\r\nWhy do you want to store a timestamp in the `message` field in graylog? Do you know that graylog assigns a separate `timestamp` field for each message it gets? For example:\r\n\r\n![timestamp](https://user-images.githubusercontent.com/3599143/44835182-095e7280-ac3c-11e8-9b10-300f17f5f4e2.png)\r\n\r\nAnd you end up with two different timestamps. ","created_at":"2018-08-30T07:04:39Z","updated_at":"2018-08-30T07:04:39Z","html_url":"https://github.com/namshi/winston-graylog2/pull/62#discussion_r213922889","pull_request_url":"https://api.github.com/repos/namshi/winston-graylog2/pulls/62","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/namshi/winston-graylog2/pulls/comments/213922889"},"html":{"href":"https://github.com/namshi/winston-graylog2/pull/62#discussion_r213922889"},"pull_request":{"href":"https://api.github.com/repos/namshi/winston-graylog2/pulls/62"}},"in_reply_to_id":213464500},"pull_request":{"url":"https://api.github.com/repos/namshi/winston-graylog2/pulls/62","id":211384393,"node_id":"MDExOlB1bGxSZXF1ZXN0MjExMzg0Mzkz","html_url":"https://github.com/namshi/winston-graylog2/pull/62","diff_url":"https://github.com/namshi/winston-graylog2/pull/62.diff","patch_url":"https://github.com/namshi/winston-graylog2/pull/62.patch","issue_url":"https://api.github.com/repos/namshi/winston-graylog2/issues/62","number":62,"state":"open","locked":false,"title":"Fix incorrect Error objects when logging and Added  formatters","user":{"login":"surbhi-mahajan","id":18246899,"node_id":"MDQ6VXNlcjE4MjQ2ODk5","avatar_url":"https://avatars2.githubusercontent.com/u/18246899?v=4","gravatar_id":"","url":"https://api.github.com/users/surbhi-mahajan","html_url":"https://github.com/surbhi-mahajan","followers_url":"https://api.github.com/users/surbhi-mahajan/followers","following_url":"https://api.github.com/users/surbhi-mahajan/following{/other_user}","gists_url":"https://api.github.com/users/surbhi-mahajan/gists{/gist_id}","starred_url":"https://api.github.com/users/surbhi-mahajan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/surbhi-mahajan/subscriptions","organizations_url":"https://api.github.com/users/surbhi-mahajan/orgs","repos_url":"https://api.github.com/users/surbhi-mahajan/repos","events_url":"https://api.github.com/users/surbhi-mahajan/events{/privacy}","received_events_url":"https://api.github.com/users/surbhi-mahajan/received_events","type":"User","site_admin":false},"body":"**Bugfix**: Resolved issue related to incorrect error object when logging to graylog server.\r\n      **Example** : - log.error(new Error('Error message')) prints empty message to graylog server as\r\nprelog method receive empty string as message . So, to include correct error message and error stack in user-defined log message, prelog function is now called with error message and meta object including error stack and other properties.\r\n**winston** version used: **2.4.4**\r\n\r\n**Feature**: Replaced prelog option with formatter option as it automatically supports various formatters like json, raw etc and various styling by reusing winston's log method.\r\n\r\n\r\n\r\n\r\n\r\n\r\n","created_at":"2018-08-28T11:07:57Z","updated_at":"2018-08-30T07:04:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ac805afa3038949120781648cf2dd7cf8ee1925d","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/namshi/winston-graylog2/pulls/62/commits","review_comments_url":"https://api.github.com/repos/namshi/winston-graylog2/pulls/62/comments","review_comment_url":"https://api.github.com/repos/namshi/winston-graylog2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/namshi/winston-graylog2/issues/62/comments","statuses_url":"https://api.github.com/repos/namshi/winston-graylog2/statuses/6fb576b3b436fa9c8368d1fa084a75359c8d8d8d","head":{"label":"surbhi-mahajan:fix-incorrect-log","ref":"fix-incorrect-log","sha":"6fb576b3b436fa9c8368d1fa084a75359c8d8d8d","user":{"login":"surbhi-mahajan","id":18246899,"node_id":"MDQ6VXNlcjE4MjQ2ODk5","avatar_url":"https://avatars2.githubusercontent.com/u/18246899?v=4","gravatar_id":"","url":"https://api.github.com/users/surbhi-mahajan","html_url":"https://github.com/surbhi-mahajan","followers_url":"https://api.github.com/users/surbhi-mahajan/followers","following_url":"https://api.github.com/users/surbhi-mahajan/following{/other_user}","gists_url":"https://api.github.com/users/surbhi-mahajan/gists{/gist_id}","starred_url":"https://api.github.com/users/surbhi-mahajan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/surbhi-mahajan/subscriptions","organizations_url":"https://api.github.com/users/surbhi-mahajan/orgs","repos_url":"https://api.github.com/users/surbhi-mahajan/repos","events_url":"https://api.github.com/users/surbhi-mahajan/events{/privacy}","received_events_url":"https://api.github.com/users/surbhi-mahajan/received_events","type":"User","site_admin":false},"repo":{"id":145853849,"node_id":"MDEwOlJlcG9zaXRvcnkxNDU4NTM4NDk=","name":"winston-graylog2","full_name":"surbhi-mahajan/winston-graylog2","owner":{"login":"surbhi-mahajan","id":18246899,"node_id":"MDQ6VXNlcjE4MjQ2ODk5","avatar_url":"https://avatars2.githubusercontent.com/u/18246899?v=4","gravatar_id":"","url":"https://api.github.com/users/surbhi-mahajan","html_url":"https://github.com/surbhi-mahajan","followers_url":"https://api.github.com/users/surbhi-mahajan/followers","following_url":"https://api.github.com/users/surbhi-mahajan/following{/other_user}","gists_url":"https://api.github.com/users/surbhi-mahajan/gists{/gist_id}","starred_url":"https://api.github.com/users/surbhi-mahajan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/surbhi-mahajan/subscriptions","organizations_url":"https://api.github.com/users/surbhi-mahajan/orgs","repos_url":"https://api.github.com/users/surbhi-mahajan/repos","events_url":"https://api.github.com/users/surbhi-mahajan/events{/privacy}","received_events_url":"https://api.github.com/users/surbhi-mahajan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/surbhi-mahajan/winston-graylog2","description":"Graylog2 transport for winston, a nodejs logging module","fork":true,"url":"https://api.github.com/repos/surbhi-mahajan/winston-graylog2","forks_url":"https://api.github.com/repos/surbhi-mahajan/winston-graylog2/forks","keys_url":"https://api.github.com/repos/surbhi-mahajan/winston-graylog2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/surbhi-mahajan/winston-graylog2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/surbhi-mahajan/winston-graylog2/teams","hooks_url":"https://api.github.com/repos/surbhi-mahajan/winston-graylog2/hooks","issue_events_url":"https://api.github.com/repos/surbhi-mahajan/winston-graylog2/issues/events{/number}","events_url":"https://api.github.com/repos/surbhi-mahajan/winston-graylog2/events","assignees_url":"https://api.github.com/repos/surbhi-mahajan/winston-graylog2/assignees{/user}","branches_url":"https://api.github.com/repos/surbhi-mahajan/winston-graylog2/branches{/branch}","tags_url":"https://api.github.com/repos/surbhi-mahajan/winston-graylog2/tags","blobs_url":"https://api.github.com/repos/surbhi-mahajan/winston-graylog2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/surbhi-mahajan/winston-graylog2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/surbhi-mahajan/winston-graylog2/git/refs{/sha}","trees_url":"https://api.github.com/repos/surbhi-mahajan/winston-graylog2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/surbhi-mahajan/winston-graylog2/statuses/{sha}","languages_url":"https://api.github.com/repos/surbhi-mahajan/winston-graylog2/languages","stargazers_url":"https://api.github.com/repos/surbhi-mahajan/winston-graylog2/stargazers","contributors_url":"https://api.github.com/repos/surbhi-mahajan/winston-graylog2/contributors","subscribers_url":"https://api.github.com/repos/surbhi-mahajan/winston-graylog2/subscribers","subscription_url":"https://api.github.com/repos/surbhi-mahajan/winston-graylog2/subscription","commits_url":"https://api.github.com/repos/surbhi-mahajan/winston-graylog2/commits{/sha}","git_commits_url":"https://api.github.com/repos/surbhi-mahajan/winston-graylog2/git/commits{/sha}","comments_url":"https://api.github.com/repos/surbhi-mahajan/winston-graylog2/comments{/number}","issue_comment_url":"https://api.github.com/repos/surbhi-mahajan/winston-graylog2/issues/comments{/number}","contents_url":"https://api.github.com/repos/surbhi-mahajan/winston-graylog2/contents/{+path}","compare_url":"https://api.github.com/repos/surbhi-mahajan/winston-graylog2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/surbhi-mahajan/winston-graylog2/merges","archive_url":"https://api.github.com/repos/surbhi-mahajan/winston-graylog2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/surbhi-mahajan/winston-graylog2/downloads","issues_url":"https://api.github.com/repos/surbhi-mahajan/winston-graylog2/issues{/number}","pulls_url":"https://api.github.com/repos/surbhi-mahajan/winston-graylog2/pulls{/number}","milestones_url":"https://api.github.com/repos/surbhi-mahajan/winston-graylog2/milestones{/number}","notifications_url":"https://api.github.com/repos/surbhi-mahajan/winston-graylog2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/surbhi-mahajan/winston-graylog2/labels{/name}","releases_url":"https://api.github.com/repos/surbhi-mahajan/winston-graylog2/releases{/id}","deployments_url":"https://api.github.com/repos/surbhi-mahajan/winston-graylog2/deployments","created_at":"2018-08-23T12:58:12Z","updated_at":"2018-08-23T12:58:13Z","pushed_at":"2018-08-30T02:41:53Z","git_url":"git://github.com/surbhi-mahajan/winston-graylog2.git","ssh_url":"git@github.com:surbhi-mahajan/winston-graylog2.git","clone_url":"https://github.com/surbhi-mahajan/winston-graylog2.git","svn_url":"https://github.com/surbhi-mahajan/winston-graylog2","homepage":"","size":71,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"namshi:master","ref":"master","sha":"5385ed2310adf15783b95569159b4c9cafe40e62","user":{"login":"namshi","id":2181945,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIxODE5NDU=","avatar_url":"https://avatars3.githubusercontent.com/u/2181945?v=4","gravatar_id":"","url":"https://api.github.com/users/namshi","html_url":"https://github.com/namshi","followers_url":"https://api.github.com/users/namshi/followers","following_url":"https://api.github.com/users/namshi/following{/other_user}","gists_url":"https://api.github.com/users/namshi/gists{/gist_id}","starred_url":"https://api.github.com/users/namshi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/namshi/subscriptions","organizations_url":"https://api.github.com/users/namshi/orgs","repos_url":"https://api.github.com/users/namshi/repos","events_url":"https://api.github.com/users/namshi/events{/privacy}","received_events_url":"https://api.github.com/users/namshi/received_events","type":"Organization","site_admin":false},"repo":{"id":3347083,"node_id":"MDEwOlJlcG9zaXRvcnkzMzQ3MDgz","name":"winston-graylog2","full_name":"namshi/winston-graylog2","owner":{"login":"namshi","id":2181945,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIxODE5NDU=","avatar_url":"https://avatars3.githubusercontent.com/u/2181945?v=4","gravatar_id":"","url":"https://api.github.com/users/namshi","html_url":"https://github.com/namshi","followers_url":"https://api.github.com/users/namshi/followers","following_url":"https://api.github.com/users/namshi/following{/other_user}","gists_url":"https://api.github.com/users/namshi/gists{/gist_id}","starred_url":"https://api.github.com/users/namshi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/namshi/subscriptions","organizations_url":"https://api.github.com/users/namshi/orgs","repos_url":"https://api.github.com/users/namshi/repos","events_url":"https://api.github.com/users/namshi/events{/privacy}","received_events_url":"https://api.github.com/users/namshi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/namshi/winston-graylog2","description":"Graylog2 transport for winston, a nodejs logging module","fork":false,"url":"https://api.github.com/repos/namshi/winston-graylog2","forks_url":"https://api.github.com/repos/namshi/winston-graylog2/forks","keys_url":"https://api.github.com/repos/namshi/winston-graylog2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/namshi/winston-graylog2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/namshi/winston-graylog2/teams","hooks_url":"https://api.github.com/repos/namshi/winston-graylog2/hooks","issue_events_url":"https://api.github.com/repos/namshi/winston-graylog2/issues/events{/number}","events_url":"https://api.github.com/repos/namshi/winston-graylog2/events","assignees_url":"https://api.github.com/repos/namshi/winston-graylog2/assignees{/user}","branches_url":"https://api.github.com/repos/namshi/winston-graylog2/branches{/branch}","tags_url":"https://api.github.com/repos/namshi/winston-graylog2/tags","blobs_url":"https://api.github.com/repos/namshi/winston-graylog2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/namshi/winston-graylog2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/namshi/winston-graylog2/git/refs{/sha}","trees_url":"https://api.github.com/repos/namshi/winston-graylog2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/namshi/winston-graylog2/statuses/{sha}","languages_url":"https://api.github.com/repos/namshi/winston-graylog2/languages","stargazers_url":"https://api.github.com/repos/namshi/winston-graylog2/stargazers","contributors_url":"https://api.github.com/repos/namshi/winston-graylog2/contributors","subscribers_url":"https://api.github.com/repos/namshi/winston-graylog2/subscribers","subscription_url":"https://api.github.com/repos/namshi/winston-graylog2/subscription","commits_url":"https://api.github.com/repos/namshi/winston-graylog2/commits{/sha}","git_commits_url":"https://api.github.com/repos/namshi/winston-graylog2/git/commits{/sha}","comments_url":"https://api.github.com/repos/namshi/winston-graylog2/comments{/number}","issue_comment_url":"https://api.github.com/repos/namshi/winston-graylog2/issues/comments{/number}","contents_url":"https://api.github.com/repos/namshi/winston-graylog2/contents/{+path}","compare_url":"https://api.github.com/repos/namshi/winston-graylog2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/namshi/winston-graylog2/merges","archive_url":"https://api.github.com/repos/namshi/winston-graylog2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/namshi/winston-graylog2/downloads","issues_url":"https://api.github.com/repos/namshi/winston-graylog2/issues{/number}","pulls_url":"https://api.github.com/repos/namshi/winston-graylog2/pulls{/number}","milestones_url":"https://api.github.com/repos/namshi/winston-graylog2/milestones{/number}","notifications_url":"https://api.github.com/repos/namshi/winston-graylog2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/namshi/winston-graylog2/labels{/name}","releases_url":"https://api.github.com/repos/namshi/winston-graylog2/releases{/id}","deployments_url":"https://api.github.com/repos/namshi/winston-graylog2/deployments","created_at":"2012-02-03T18:33:29Z","updated_at":"2018-08-29T06:22:46Z","pushed_at":"2018-08-30T02:41:55Z","git_url":"git://github.com/namshi/winston-graylog2.git","ssh_url":"git@github.com:namshi/winston-graylog2.git","clone_url":"https://github.com/namshi/winston-graylog2.git","svn_url":"https://github.com/namshi/winston-graylog2","homepage":"","size":76,"stargazers_count":85,"watchers_count":85,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":37,"mirror_url":null,"archived":false,"open_issues_count":6,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":37,"open_issues":6,"watchers":85,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/namshi/winston-graylog2/pulls/62"},"html":{"href":"https://github.com/namshi/winston-graylog2/pull/62"},"issue":{"href":"https://api.github.com/repos/namshi/winston-graylog2/issues/62"},"comments":{"href":"https://api.github.com/repos/namshi/winston-graylog2/issues/62/comments"},"review_comments":{"href":"https://api.github.com/repos/namshi/winston-graylog2/pulls/62/comments"},"review_comment":{"href":"https://api.github.com/repos/namshi/winston-graylog2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/namshi/winston-graylog2/pulls/62/commits"},"statuses":{"href":"https://api.github.com/repos/namshi/winston-graylog2/statuses/6fb576b3b436fa9c8368d1fa084a75359c8d8d8d"}},"author_association":"NONE"}}
{"actor":{"display_login":"schfkt"}}