trentm/node-bunyan

Cannot set name field when creating child

sergejostir opened this issue · 0 comments

Is there a technical reason for such restriction? You can easily change the name directly on the object after creation and I couldn't figure out any reason why that would be unsafe.

node-bunyan/lib/bunyan.js

Lines 370 to 379 in fe31b83

if (!parent) {
if (!options.name) {
throw new TypeError('options.name (string) is required');
}
} else {
if (options.name) {
throw new TypeError(
'invalid options.name: child cannot set logger name');
}
}