Skip to content
Snippets Groups Projects
Unverified Commit 01155838 authored by Sigmund, Dominik's avatar Sigmund, Dominik
Browse files

Fix loki timestamps

parents 6fc288b9 ab605531
No related branches found
No related tags found
1 merge request!1Update index.test.js, examples/all-options.js, examples/log-to-file.js,...
...@@ -162,7 +162,7 @@ function Log (options) { ...@@ -162,7 +162,7 @@ function Log (options) {
level: this.levels[tag] level: this.levels[tag]
}) })
if (this.options.graylog.mode && this.options.graylog.mode === 'http') { if (this.options.graylog.mode && this.options.graylog.mode === 'http') {
this.request.post(this.options.graylog.server + ':' + this.options.graylog.port + '/gelf', {body: data}, (error, res, body) => { this.request.post(this.options.graylog.server + ':' + this.options.graylog.port + '/gelf', {body: data, strictSSL: false}, (error, res, body) => {
if (error) { if (error) {
console.error(error) console.error(error)
} }
...@@ -181,7 +181,7 @@ function Log (options) { ...@@ -181,7 +181,7 @@ function Log (options) {
{ {
stream: { stream: {
hostname: this.hostname, hostname: this.hostname,
name: this.name app: this.name
}, },
values: [ values: [
[Date.now().toString(), message] [Date.now().toString(), message]
...@@ -189,7 +189,7 @@ function Log (options) { ...@@ -189,7 +189,7 @@ function Log (options) {
} }
] ]
}) })
this.request.post(this.options.loki.server + '/loki/api/v1/push', {body: data, json: true}, (error, res, body) => { this.request.post(this.options.loki.server + '/loki/api/v1/push', {body: data, json: true, strictSSL: false}, (error, res, body) => {
if (error) { if (error) {
console.error(error) console.error(error)
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment