Skip to content
Snippets Groups Projects
Commit 460f344e authored by admin-sigmundd's avatar admin-sigmundd
Browse files

cleanup

parent 7f3f7643
No related branches found
No related tags found
1 merge request!1Update index.test.js, examples/all-options.js, examples/log-to-file.js,...
function Log (options) {
this.fs = require('fs')
this.os = require('os')
this.options = options || {}
if (this.options.name) {
this.name = this.options.name
} else {
this.name = require('./package.json').name
}
this.hostname = (this.options.hostname) ? this.options.hostname : this.os.hostname()
if (this.options.hostname) {
this.hostname = this.options.hostname
} else {
let os = require('os')
this.hostname = os.hostname()
}
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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment