Let's say you add an additional level like this:
const log = require('gelf-pro');
log.setConfig({
emergency: 0,
alert: 1,
critical: 2,
error: 3,
warning: 4,
notice: 5,
info: 6,
debug: 7,
trace: 8,
});
log.trace() will be undefined. This is because these methods are defined while requiring the module, with no chances to update the levels or aliases before.
Maybe the methods should be redefined while calling setConfig().