Skip to content

Commit 3df9f3b

Browse files
committed
🔊 Update remote syslog udp environment variable
1 parent 9851a1b commit 3df9f3b

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

‎.env.example‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ WEBHOOK_PROXY_URL=
1111
# Relative path of the webhook
1212
WEBHOOK_PATH=
1313

14-
# Log to Papertrail
15-
PAPERTRAIL_HOST=
16-
PAPERTRAIL_PORT=
14+
# Log to remote syslog server
15+
SYSLOG_UDP_HOST=
16+
SYSLOG_UDP_HOST=
1717

1818
# Log errors to Sentry
1919
SENTRY_DSN=

‎index.js‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@ const getJSON = uri => requestPromise({
1919
})
2020

2121
module.exports = async (app) => {
22-
const papertrailHost = process.env.PAPERTRAIL_HOST
23-
const papertrailPort = parseInt(process.env.PAPERTRAIL_PORT, 10)
24-
if (papertrailHost && papertrailPort) {
22+
const syslogHost = process.env.SYSLOG_UDP_HOST
23+
const syslogPort = parseInt(process.env.SYSLOG_UDP_PORT, 10)
24+
if (syslogHost && syslogPort) {
2525
app.log.target.addStream({
2626
type: 'raw',
2727
level: process.env.LOG_LEVEL || 'trace',
2828
stream: bsyslog.createBunyanStream({
2929
name: 'pull',
30-
host: papertrailHost,
31-
port: papertrailPort
30+
host: syslogHost,
31+
port: syslogPort
3232
})
3333
})
3434
}

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"lint:fix": "standard --fix",
1313
"test": "standard && jest",
1414
"test:watch": "jest --watchAll --notify --notifyMode=change --coverage",
15-
"travis:deploy-now": "now --public -e WEBHOOK_SECRET=$WEBHOOK_SECRET -e PRIVATE_BASE64=\"$PRIVATE_BASE64\" -e SENTRY_DSN=\"$SENTRY_DSN\" -e PAPERTRAIL_HOST=$PAPERTRAIL_HOST -e PAPERTRAIL_PORT=$PAPERTRAIL_PORT --token=$NOW_TOKEN && now alias --token=$NOW_TOKEN && now scale $NOW_ALIAS.now.sh sfo1 1 --token=$NOW_TOKEN && (now rm $NOW_ALIAS --safe -y --token=$NOW_TOKEN || true)"
15+
"travis:deploy-now": "now --public -e WEBHOOK_SECRET=$WEBHOOK_SECRET -e PRIVATE_BASE64=\"$PRIVATE_BASE64\" -e SENTRY_DSN=\"$SENTRY_DSN\" -e SYSLOG_UDP_HOST=$SYSLOG_UDP_HOST -e SYSLOG_UDP_PORT=$SYSLOG_UDP_PORT --token=$NOW_TOKEN && now alias --token=$NOW_TOKEN && now scale $NOW_ALIAS.now.sh sfo1 1 --token=$NOW_TOKEN && (now rm $NOW_ALIAS --safe -y --token=$NOW_TOKEN || true)"
1616
},
1717
"dependencies": {
1818
"bunyan-syslog-udp": "^0.1.0",

0 commit comments

Comments
 (0)