diff --git a/lib/winston/exception.js b/lib/winston/exception.js index 2a01e91c7..03c98dd40 100644 --- a/lib/winston/exception.js +++ b/lib/winston/exception.js @@ -23,8 +23,8 @@ exception.getAllInfo = function (err) { exception.getProcessInfo = function () { return { pid: process.pid, - uid: process.getuid(), - gid: process.getgid(), + uid: process.getuid ? process.getuid() : null, + gid: process.getgid ? process.getgid() : null, cwd: process.cwd(), execPath: process.execPath, version: process.version,