Skip to content

Commit

Permalink
fix(config): DO not assume that gelf config is set
Browse files Browse the repository at this point in the history
  • Loading branch information
andris9 committed Oct 28, 2024
1 parent 949a267 commit 62b7eb7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ module.exports.init = function (app, done) {

const component = ((app.config.gelf && app.config.gelf.component) || 'mta').toUpperCase();

const maxSubjectLineLogLengthBytes = app.config.gelf.subjectLength || 32766 - 1; // 32766 is max gelf default, do -1 for good measure
const maxSubjectLineLogLengthBytes = (app.config.gelf && app.config.gelf.subjectLength) || 32766 - 1; // 32766 is max gelf default, do -1 for good measure

const hostname = app.config.hostname || os.hostname();
const gelf =
Expand Down

0 comments on commit 62b7eb7

Please sign in to comment.