mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Only add _alias/z to log messages if they are defined
This commit is contained in:
@@ -222,11 +222,15 @@ function log_helper(self, level, msg) {
|
||||
var o = {
|
||||
level: level,
|
||||
id: self.id,
|
||||
z: self.z,
|
||||
type: self.type,
|
||||
_alias: self._alias,
|
||||
msg: msg
|
||||
};
|
||||
if (self._alias) {
|
||||
o._alias = self._alias;
|
||||
}
|
||||
if (self.z) {
|
||||
o.z = self.z;
|
||||
}
|
||||
if (self.name) {
|
||||
o.name = self.name;
|
||||
}
|
||||
|
Reference in New Issue
Block a user