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

Use Package.json instead of basepath

parent ec4df208
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) { function Log (options) {
this.path = require('path')
this.fs = require('fs') this.fs = require('fs')
this.os = require('os') this.os = require('os')
this.options = options || {} this.options = options || {}
this.name = (this.options.name) ? this.options.name : this.path.basename(this.path.dirname(require.main.filename)) 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() this.hostname = (this.options.hostname) ? this.options.hostname : this.os.hostname()
if (this.options.graylog) { if (this.options.graylog) {
this.graylog2 = require('graylog2') this.graylog2 = require('graylog2')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment