From 3300dfae600bf2c7bdc690dd974ce0f413b38128 Mon Sep 17 00:00:00 2001 From: Christophe Bol Date: Mon, 1 Dec 2014 15:34:09 +0100 Subject: [PATCH] fixed error when logging from the clustered master --- lib/layouts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/layouts.js b/lib/layouts.js index be5681c..1a1f094 100644 --- a/lib/layouts.js +++ b/lib/layouts.js @@ -213,7 +213,7 @@ function patternLayout (pattern, tokens) { } function pid(loggingEvent) { - if (loggingEvent.pid) { + if (loggingEvent && loggingEvent.pid) { return loggingEvent.pid; } else { return process.pid;