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

Added loglevel

parent 6a15cd3a
No related branches found
No related tags found
1 merge request!1Update index.test.js, examples/all-options.js, examples/log-to-file.js,...
......@@ -176,19 +176,20 @@ function Log (options) {
}
}
if (this.options.loki && this.options.loki.active) {
let data = JSON.stringify({
let data = {
streams: [
{
stream: {
hostname: this.hostname,
app: this.name
app: this.name,
level: this.levels[tag]
},
values: [
[Date.now().toString(), message]
]
}
]
})
}
this.request.post(this.options.loki.server + '/loki/api/v1/push', {body: data, json: true, strictSSL: false}, (error, res, body) => {
if (error) {
console.error(error)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment