diff --git a/index.js b/index.js index 7b93f25..46d95cc 100644 --- a/index.js +++ b/index.js @@ -69,10 +69,13 @@ function resolvePluginPath(dirname) { * Initialize the logger. * * @param {Object} args + * @param {string} args.name + * @param {boolean} args.omitHost + * @param {object} args.meta * @return {Function} */ function init(args) { - var output, stream, pretty, name, meta; + let output, stream, pretty, name, meta, omitHost; checkArgs(args); @@ -80,6 +83,7 @@ function init(args) { stream = getOutput(args); pretty = getPrettyPrint(args); name = args.name; + omitHost = args.omitHost || false; meta = args.meta || undefined; if (pretty) { @@ -91,6 +95,7 @@ function init(args) { // level is set via an env var called `LOG` logger = pino({ name: name, + base: omitHost ? { pid: process.pid } : undefined, level: process.env.LOG || 'info' }, output); diff --git a/package-lock.json b/package-lock.json index c9e3ba5..f1ac11b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "clay-log", - "version": "1.5.4", + "version": "1.5.5", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index b633fa3..93ad6a1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "clay-log", - "version": "1.5.4", + "version": "1.5.5", "description": "An isomorphic logging module for Clay projects", "main": "index.js", "scripts": {